Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Modified from https://gist.github.com/Stono/7e6fed13cfd79598eb15
#
# MIT License applies to this script. I don't accept any responsibility for
# damage you may cause using it.
set -ex
if [[ $EUID -ne 0 ]]; then
echo "* This script needs to be run as root"

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

NOTE: "M-m and SPC can be used interchangeably".

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u
  1. Lower Case : M-l
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
/* Smartphones (landscape) ----------- */
@media only screen
@MrCoffey
MrCoffey / css-media-queries-cheat-sheet.css
Created June 13, 2016 23:06 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@MrCoffey
MrCoffey / sidekiq.config
Last active April 4, 2016 21:04 — forked from RobertoSchneiders/sidekiq.config
Sidekiq Config for Elastic Beanstalk
# Sidekiq interaction and startup script
files:
"/opt/elasticbeanstalk/hooks/appdeploy/post/50_restart_sidekiq.sh":
mode: "000755"
content: |
#!/bin/bash
. /opt/elasticbeanstalk/hooks/common.sh
. /opt/elasticbeanstalk/support/envvars
@MrCoffey
MrCoffey / 0000_packages.config
Created March 28, 2016 18:19 — forked from gcarrion-gfrmedia/0000_packages.config
AWS Elastic Beanstalk Ruby 2.0/Puma Environment - .ebextensions tweaks and Sidekiq configuration. This is known to work fine with AWS Elastic Beanstalk 's 64bit Amazon Linux 2014.03 v1.0.1 running Ruby 2.0 (Puma) stack. Later stack versions might not work, but for that specific version works fine.
# Install Git needed for Git based gems
packages:
yum:
git: []
@MrCoffey
MrCoffey / gist:87a7a07347cd28a8ab6e
Created February 22, 2016 21:26 — forked from hpjaj/gist:ef5ba70a938a963332d0
RSpec - List of available Expectation Matchers - from Lynda.com course 'RSpec Testing Framework with Ruby'
## From Lynda.com course 'RSpec Testing Framework with Ruby'
describe 'Expectation Matchers' do
describe 'equivalence matchers' do
it 'will match loose equality with #eq' do
a = "2 cats"
b = "2 cats"
expect(a).to eq(b)
@MrCoffey
MrCoffey / ways_to_use_vcr.rb
Created February 19, 2016 21:27 — forked from myronmarston/ways_to_use_vcr.rb
Ways to use VCR for a request made by a let block
# 1) Use VCR.use_cassette in your let block. This will use
# the cassette just for requests made by creating bar, not
# for anything else in your test.
let(:foo) { VCR.use_cassette("foo") { create(:bar) } }
it "uses foo" do
foo
end
# 2) Wrap the it block that uses #foo in VCR.use_cassette.
@MrCoffey
MrCoffey / gist:3a6fe552364a2bab9c95
Created January 24, 2016 16:54 — forked from learncodeacademy/gist:5850f394342a5bfdbfa4
SSH Basics - Getting started with Linux Server Administration

###SSH into a remote machine###

ssh user@mydomain.com
#or by ip address
ssh user@192.168.1.1

exit: exit ###Install Something###

#If it's a new server, update apt-get first thing