Prepare by switching out of bash from Homebrew:
chsh -s /bin/zsh
To clean my system and reinstall Homebrew:
rm -rf ~/.local && mkdir ~/.local
rm -rf ~/Library/Caches/pip
rm -rf ~/.pyenv
rm -rf ~/.yarn
| # Written by Aaron Cohen -- 1/14/2013 | |
| # Brought to you by BitTorrent, Inc. | |
| # "We're not just two guys in a basement in Sweden." TM | |
| # | |
| # This work is licensed under a Creative Commons Attribution 3.0 Unported License. | |
| # See: http://creativecommons.org/licenses/by/3.0/ | |
| import sys | |
| import re | |
| import socket |
| var options = {}; | |
| // jQuery options | |
| // options.url = foo; | |
| // CSRF Token | |
| var csrfToken = $("input[name='__RequestVerificationToken']").val(); | |
| if (csrfToken) { | |
| options.headers = { |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| {-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase #-} | |
| import Conduit | |
| import Data.Conduit | |
| import Data.Conduit.Network | |
| import qualified Data.ByteString.Char8 as BS | |
| import Data.Conduit.TMChan | |
| import Text.Printf (printf) | |
| import Control.Concurrent.STM | |
| import qualified Data.Map as Map |
| # Alternatively don't use slog but something else. I just like that more. | |
| [aliases] | |
| slog = log --pretty=format:"%C(auto,yellow)%h%C(auto)%d\\ %C(auto,reset)%s\\ \\ [%C(auto,blue)%cn%C(auto,reset),\\ %C(auto,cyan)%ar%C(auto,reset)]" | |
| addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \ | |
| git fetch origin pull/$1/head:pr/$1 && \ | |
| git fetch -f origin pull/$1/merge:PR_MERGE_HEAD && \ | |
| git rebase --onto $b PR_MERGE_HEAD^ pr/$1 && \ | |
| git branch -D PR_MERGE_HEAD && \ | |
| git checkout $b && echo && \ | |
| git diff --stat $b..pr/$1 && echo && \ |
| """Twitter bot that tweets a random line from a file. | |
| Uses Twisted to periodically select a random line from an input file, | |
| and Twython to post it to Twitter using your credentials. | |
| Usage: python twitterbot.py file.txt, where each line in file.txt is | |
| a single sentence terminated by a newline ('\n'). | |
| """ | |
| import sys |
| INTRO | |
| I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute. | |
| Short Link: http://tiny.cc/awssecurity | |
| Official AWS Security Resources | |
| * Security Blog - http://blogs.aws.amazon.com/security/ | |
| * Security Advisories - http://aws.amazon.com/security/security-bulletins/ | |
| * Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf | |
| * Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf |
Prepare by switching out of bash from Homebrew:
chsh -s /bin/zsh
To clean my system and reinstall Homebrew:
rm -rf ~/.local && mkdir ~/.local
rm -rf ~/Library/Caches/pip
rm -rf ~/.pyenv
rm -rf ~/.yarn
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft