This file contains hidden or 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 | |
| # OpenVPN Installer | |
| # | |
| # This installer was designed to work with Ubuntu 14.04. It installs | |
| # an OpenVPN server, generates an associated OpenVPN client configuration file, | |
| # configures a firewall, and enables automatic security updates. | |
| # | |
| # Once the installer finishes, the `/root/client.ovpn` file will have been generated. | |
| # Download this file to your local machine and open it in an OpenVPN client and you'll |
This file contains hidden or 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
| ;; from http://www.lunaryorn.com/2015/04/29/the-power-of-display-buffer-alist.html | |
| (add-to-list 'display-buffer-alist | |
| `(,(rx bos (or | |
| "*rspec-compilation*" | |
| "*projectile-rails-compilation*" | |
| "*Bundler*" | |
| "*alchemist test report*" | |
| "*alchemist macroexpand*" | |
| "*alchemist mix*" | |
| "*elixir help*" |
This file contains hidden or 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
| 1. Dump the data only sql to file | |
| $ pg_dump --data-only --inserts YOUR_DB_NAME > dump.sql | |
| 2. scp to local | |
| 3. Remove the SET statements at the top | |
| such as: | |
| SET statement_timeout = 0; | |
| SET client_encoding = 'SQL_ASCII'; | |
| 4. Remove the setval sequence queries |
This file contains hidden or 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
| # content has to be in .config/fish/config.fish | |
| # if it does not exist, create the file | |
| setenv SSH_ENV $HOME/.ssh/environment | |
| function start_agent | |
| echo "Initializing new SSH agent ..." | |
| ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV | |
| echo "succeeded" | |
| chmod 600 $SSH_ENV | |
| . $SSH_ENV > /dev/null |
(A book that I might eventually write!)
Gary Bernhardt
I imagine each of these chapters being about 2,000 words, making the whole book about the size of a small novel. For comparison, articles in large papers like the New York Times average about 1,200 words. Each topic gets whatever level of detail I can fit into that space. For simple topics, that's a lot of space: I can probably walk through a very basic, but working, implementation of the IP protocol.
This file contains hidden or 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 | |
| # 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" |
This file contains hidden or 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
| # fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort) | |
| fshow() { | |
| local out shas sha q k | |
| while out=$( | |
| git log --graph --color=always \ | |
| --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | | |
| fzf --ansi --multi --no-sort --reverse --query="$q" \ | |
| --print-query --expect=ctrl-d --toggle-sort=\`); do | |
| q=$(head -1 <<< "$out") | |
| k=$(head -2 <<< "$out" | tail -1) |
This file contains hidden or 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/sh | |
| #--------------------------------------------- | |
| # xdg-open | |
| # | |
| # Utility script to open a URL in the registered default application. | |
| # | |
| # Refer to the usage() function below for usage. | |
| # | |
| # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> | |
| # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> |
This file contains hidden or 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
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |