Skip to content

Instantly share code, notes, and snippets.

View jtimberman's full-sized avatar
🚀

Joshua Timberman jtimberman

🚀
View GitHub Profile
@jtimberman
jtimberman / gist:74da4c05063eccf81944f189b40d6f81
Created April 17, 2025 19:40 — forked from btm/gist:6700524
Why curl | sudo bash is good: it is simple single line, and uses the same channel that downloading a repository signing key would.

Easy one line Chef installation for all platforms (except windows)

curl https://www.opscode.com/chef/install.sh | sudo bash

That's it. This can be put in any instructions, such as a README or someone's blog, since the logic is in the shell script. Provided you download the script using https, the file has standard levels of authentication and encryption protecting it from manipulation.

This is obviously a shell script, if you're really concerned about the argument that it may contain nefarious activities within, you can easily review it before you run it.

@irvingpop
irvingpop / okta-aws.plugin.zsh
Created September 17, 2018 20:32
okta_aws plugin for oh-my-zsh
# shellcheck disable=SC2148
# shellcheck disable=SC2034
# okta-aws plugin for oh-my-zsh
# for use with the bullet-train oh-my-zsh theme: https://github.com/caiogondim/bullet-train.zsh
# (although this could be easily changed)
# Irving Popovetsky <[email protected]>
# default profile is used if you don't set one using AWS_PROFILE, which is recommended
OKTA_AWS_DEFAULT_PROFILE="chef-engineering"
# Save this as ~/.chef/newcreds.rb
# Add require_relative 'newcreds' to your ~/.chef/knife.rb
require 'tomlrb'
require 'pathname'
context_file = "#{Dir.home}/.chef/context"
credentials_file = "#{Dir.home}/.chef/credentials"
context = File.read(context_file).chomp if File.exist?(context_file)
profile_name = ENV["CHEF_PROFILE"] || context || "default"
@jtimberman
jtimberman / gist:420eca4c2986e458120f963b80227bd5
Created May 1, 2018 22:30 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@jtimberman
jtimberman / dynamic-fonts.el
Last active May 23, 2016 17:08 — forked from arnab/dynamic-fonts.el
Dynamically adjust fonts in emacs based on screen resolution (Retina vs. Thunderbolt)
;; Gist-ed from in https://github.com/arnab/emacs-starter-kit
(defun fontify-frame (frame)
(interactive)
(if window-system
(progn
(if (> (x-display-pixel-width) 2000)
(set-frame-parameter frame 'font "Inconsolata 19") ;; Cinema Display
(set-frame-parameter frame 'font "Inconsolata 16")))))
#!/bin/bash
# user-data-hardening.sh
# Authors: Cody Bunch ([email protected])
#
# Script intended to be supplied as userdata to a cloud of some flavor.
# Enables some sane sysctl defaults, turns up iptables, and
# installs a HIDS / NIDS package
# Supply your email here
email_address="[email protected]"
save-last-command() {
last_command=$(fc -nl 0)
command_name="$1"
read -r -d '' new_fun <<EOF
${command_name}() {
$last_command
}
EOF
eval "$new_fun"
}
@jtimberman
jtimberman / nginx.conf
Created November 30, 2014 17:03
Gist for archival purposes, via the wayback machine https://web.archive.org/web/20131222092914/http://brainspl.at/nginx.conf.txt - brainspl.at seems to be offline :(
# Gist for archival purposes, via the wayback machine,
# https://web.archive.org/web/20131222092914/http://brainspl.at/nginx.conf.txt
# - brainspl.at seems to be offline :(
#
# View other versions at https://web.archive.org/web/*/http://brainspl.at/nginx.conf.txt
#
# user and group to run as
user ez ez;
# number of nginx workers
[user]
name = Joshua Timberman
email = [email protected]
[color]
ui = true
diff = true
status = true
branch = true
interactive = true
[core]
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶