Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Looking forward

Jeremy Neander jneander

🤔
Looking forward
View GitHub Profile
@jneander
jneander / screenreader-only.css
Created Jul 14, 2016
Visually hide an element, yet keep it available to screenreaders.
View screenreader-only.css
.screenreader-only {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
transform: translatez(0);
@jneander
jneander / del.sh
Last active Aug 29, 2015 — forked from itsthatguy/del.sh
The `rm` command is destructive. Here's a command to move files to the trash, with a prompt, instead of deleting permanently.
View del.sh
# Add this to your .bash_profile, .bashrc, .zshrc or wherever you keep your bash functions and aliases.
del() {
RED="\e[31m"
YELLOW="\e[33m"
WHITE="\e[97m"
if [[ $# -eq 0 ]] ; then
echo -e "Sorry dude, I can't do anything with that. Nothing specified."
else
@jneander
jneander / digital_ocean_setup.md
Last active Aug 29, 2015 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
View digital_ocean_setup.md

DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

Create a Droplet

SSH into Root

$ ssh root@123.123.123.123

Change Root Password

@jneander
jneander / _instructions.md
Last active Aug 29, 2015
Setting up a Ubuntu instance to run NGINX and Unicorn, with deployment using Capistrano.
View _instructions.md

Disclaimer: This is a work in progress and may not represent best practices.

Linux Instance Setup

Update Linux packages.

sudo apt-get update

Security

View console_color_codes.sh
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
Yellow='\e[0;33m' # Yellow
Blue='\e[0;34m' # Blue
Purple='\e[0;35m' # Purple
View git : Pretty Formats
PRETTY FORMATS
--------------
If the commit is a merge, and if the pretty-format
is not 'oneline', 'email' or 'raw', an additional line is
inserted before the 'Author:' line. This line begins with
"Merge: " and the sha1s of ancestral commits are printed,
separated by spaces. Note that the listed commits may not
necessarily be the list of the *direct* parent commits if you
have limited your view of history: for example, if you are
You can’t perform that action at this time.