Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀

Joshua Timberman jtimberman

🚀
View GitHub Profile
@jtimberman
jtimberman / gist:420eca4c2986e458120f963b80227bd5
Created May 1, 2018 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
View gist:420eca4c2986e458120f963b80227bd5
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
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 — forked from arnab/dynamic-fonts.el
Dynamically adjust fonts in emacs based on screen resolution (Retina vs. Thunderbolt)
View dynamic-fonts.el
;; 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")))))
View user_data_hardening.sh
#!/bin/bash
# user-data-hardening.sh
# Authors: Cody Bunch (bunchc@gmail.com)
#
# 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="userdata@mailinator.com"
View gist:c89f940be404422edc45

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.

View pryhandler.rb
require 'chef/log'
require 'pry'
module ChefSoftware
class CookbookVersionsHandler < Chef::Handler
def report
Chef::Log.info('Pausing in handler to run pry; type "exit" to leave pry')
binding.pry
end
View gist:6a174fc00c043e3ef1e0
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"
}
View .gitconfig
[user]
name = Joshua Timberman
email = joshua@housepub.org
[color]
ui = true
diff = true
status = true
branch = true
interactive = true
[core]
View install_command_line_tools_no_prompt
do shell script "xcode-select --install"
do shell script "sleep 1"
tell application "System Events"
tell process "Install Command Line Developer Tools"
keystroke return
click button "Agree" of window "License Agreement"
end tell
end tell
View Has weird right-to-left characters.txt
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@jtimberman
jtimberman / gist:9837538
Created Mar 28, 2014 — forked from jsierles/gist:84082
The original "knife" - a Thor task file for interacting with a Chef Server API, ca. the Stone Age of Chef :).
View gist:9837538
#!/usr/bin/ruby
#
# Joshua Sierles, 37signals, 2009
require 'rubygems'
require 'thor'
require 'chef'
require 'chef/node'
require 'chef/rest'