Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Williams jwlms

View GitHub Profile
View Github Show All Outdated Comments Bookmarklet
javascript:(function() { [].forEach.call(document.querySelectorAll('.outdated-comment'), function(element) {
element.className += ' open';
element.className += ' Details--on';
}); } ())
View dotfiles
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
prompt_git() {
local s='';
local branchName='';
View vagrant error output
==> db1: Machine booted and ready!
==> db1: Checking for guest additions in VM...
==> db1: [vagrant-hostsupdater] Checking for host entries
==> db1: Configuring and enabling network interfaces...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
/sbin/ifdown eth1 2> /dev/null
Stdout from the command:
View .rvmrc
# `rvm use default` to keep global gemset set to global
rvm use default && nvm use
@jwlms
jwlms / mq nesting
Created Jul 15, 2013
don't nest too deep
View mq nesting
.menu-toggle { ... // ok
.menu-toggle {
ul {
... // ok
}
}
.menu-toggle {
ul {
li {
@jwlms
jwlms / mq nesting
Created Jul 15, 2013
media query nesting
View mq nesting
.svg #site-title a { // OK
@media( max-width: $w7 ) {
background: transparent url(images/flv-logo.svg) no-repeat 0 0;
}
}
.svg #site-title a { // no
@media( max-width: $w7 ) {
@media ( max-device-width: $ipad ) {
background: transparent url(images/flv-logo.svg) no-repeat 0 0;
}
@jwlms
jwlms / gist:c1eb2bc7d085b6912f5f
Created Nov 10, 2015
harp post link generation
View gist:c1eb2bc7d085b6912f5f
each report, slug in public.reports._data
a(href="/reports/#{ slug }")
h2= report.title
View gist:bf7afd0585c5d6cfbcaa
find . -name "*[format]" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done
View default-server
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name HOSTNAME.com;
return 301 https://HOSTNAME.com$request_uri;
}
View gist:12951f1a63339a3165f0
sudo wget -P /etc/apt/sources.list.d https://sslmate.com/apt/ubuntu1404/sslmate.list
sudo wget -P /etc/apt/trusted.gpg.d https://sslmate.com/apt/ubuntu1404/sslmate.gpg
sudo apt-get update
sudo apt-get install sslmate