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
- Lower Case :
M-l
(function() { | |
// Load the script | |
var script = document.createElement("SCRIPT"); | |
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'; | |
script.type = 'text/javascript'; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
// Poll for jQuery to come into existance | |
var checkReady = function(callback) { | |
if (window.jQuery) { |
angular.module('stateMock',[]); | |
angular.module('stateMock').service("$state", function($q){ | |
this.expectedTransitions = []; | |
this.transitionTo = function(stateName){ | |
if(this.expectedTransitions.length > 0){ | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName){ | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} | |
}else{ |
from functools import update_wrapper | |
from django.contrib import admin | |
from django.contrib.admin import ModelAdmin | |
from django.contrib.admin.templatetags.admin_urls import add_preserved_filters | |
from django.core.exceptions import PermissionDenied | |
from django.shortcuts import render | |
from myapp.models import Widget | |
from myapp.forms import ManageWidgetForm |
# Create a unique 2048 Diffie Hellman group | |
# https://weakdh.org | |
/etc/ssl/dhparams.pem: | |
cmd.run: | |
- name: openssl dhparam -out /etc/ssl/dhparams.pem 2048 | |
- unless: test -f /etc/ssl/dhparams.pem |
// Description: | |
// Milton basic commands. | |
import Slack from 'node-slack'; | |
let slack = new Slack('https://hooks.slack.com/services/something/reallysecure'); | |
function johnnyBomb (msg) { | |
slack.send({ | |
text: 'DESTROY! DESTROY!', |
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l
//Make sure you scroll down to get all data loaded | |
var text = ''; | |
$('.col-email').each(function(index,el) { | |
if (index == 0) { | |
text = 'Email, First Name, Last Name\n'; | |
} | |
else { | |
text = text + $.trim($(el).find("a").text()) + ','; | |
//First Name |
angular.module('stateMock', []); | |
angular.module('stateMock').service("$state", function($q) { | |
this.expectedTransitions = []; | |
this.transitionTo = function(stateName) { | |
if(this.expectedTransitions.length > 0) { | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName) { | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} | |
} else { |
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
#!/usr/bin/env bash | |
function dumpBundle { | |
FILE=$1 | |
OUTDIR=$2 | |
LZMADIR=$3 | |
OUTPATH="$OUTDIR/$FILE" | |
LZMAPATH="$LZMADIR/$FILE" | |
mkdir -p $(dirname "$OUTPATH") |