This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ok": true, | |
"url": "https:\/\/myteam.slack.com\/", | |
"team": "My Team", | |
"user": "cal", | |
"team_id": "T12345", | |
"user_id": "U12345" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
require 'sinatra' | |
require 'json' | |
require 'uri' | |
CONTEXT = "spoof check" | |
GITHUB_ROOT = "https://api.github.com" | |
HEADERS = { | |
'Content-Type' => 'text/json', | |
'Authorization' => "token #{ENV['GITHUB_TOKEN']}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'html2slim' | |
html_path = "" | |
slim_path = "" | |
Dir.mkdir(slim_path) unless File.exists?(slim_path) | |
Dir["#{html_path}/*.html"].each do |file_name| | |
html = File.read(file_name).encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') | |
File.open("#{slim_path}/#{File.basename(file_name)}.slim", 'w') do |f| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family: Helvetica, arial, sans-serif; | |
font-size: 14px; | |
line-height: 1.6; | |
padding-top: 10px; | |
padding-bottom: 10px; | |
background-color: white; | |
padding: 30px; | |
color: #333; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
disable_proxy() | |
{ | |
networksetup -setsocksfirewallproxystate Wi-Fi off | |
networksetup -setsocksfirewallproxystate Ethernet off | |
echo "SOCKS proxy disabled." | |
} | |
trap disable_proxy INT | |
networksetup -setsocksfirewallproxy Wi-Fi 127.0.0.1 9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage | |
# git config --global core.excludesfile ~/.global_ignore | |
# General ------------------------------ | |
*.psd | |
# OSX ---------------------------------- | |
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bring in Source Control | |
mkdir ~/repo | |
cd ~/repo | |
git init --bare | |
# Create a git hook | |
cat > hooks/post-receive | |
#!/bin/sh | |
GIT_WORK_TREE=/home/ubuntu/www |