Skip to content

Instantly share code, notes, and snippets.

View displague's full-sized avatar
🐝
Mergin' 🎶 on a Sunday afternoon 🎶

Marques Johansson displague

🐝
Mergin' 🎶 on a Sunday afternoon 🎶
View GitHub Profile

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

@EugeneKay
EugeneKay / README.md
Last active May 17, 2022 17:32
Winode Instructions

NOTE: This Gist concerns the old Linode KVM Beta, NOT the current Manager. Please see linode/docs#501 (comment) for more up-to-date instructions.

You will need:

On the KVM source, run the following to create a VM:

@eager
eager / Copy as GitHub-Flavored Markdown.sh
Created March 20, 2014 21:04
Sequel Pro Bundle scripts
# Bundle Scope: Data Table
# Menu Label: Copy as GFM
# Menu Category: Copy
# Input: Selected Rows (TSV) AND exclude BLOB
# Tooltip: Copies the selected rows excluding any BLOB data GitHub-Flavored-Markdown table-formatted into the pasteboard
cat | perl -e '
# read first line to get the column names (header)
$firstLine = <>;
@sideshowcoder
sideshowcoder / Readme.md
Created February 13, 2014 10:04
Run vim reindent and retab from command line

Reindent and retab any file with vim from the shell

Vim has some pretty nice standarts on what indention etc. should look like, so it might make sense to run those from the command line on files without haveing to launch vim by hand. This is how it is done:

$ vim myfile.rb -s format.vim

Will execute all the commands specified in format.vim against the myfile.rb. The commands can be anything possible in vim in normal mode, so my example script will reindent the whole file (gg=G) and retab according to the rules, followed by a save.

@bennadel
bennadel / api.cfm
Created December 31, 2013 14:54
Preventing Cross-Site Request Forgery (CSRF / XSRF) With AngularJS And ColdFusion
<cfscript>
// Set up the default API response.
apiResponse = {
"statusCode" = 200,
"statusText" = "OK",
"contentType" = "application/x-json",
"data" = {}
};
@krha
krha / pivot_root.sh
Created February 14, 2012 14:55
script for pivot_root
#!/bin/sh
# credential: http://www.bluegecko.net/amazon-web-services/ec2-persistent-boots-with-pivot-root/
PATH=/bin:/usr/bin:/sbin:/usr/sbin
NEWDEV="/dev/xvdf1"
NEWTYP="ext4"
NEWMNT="/mnt/ebs"
OLDMNT="/mnt/old"
OPTIONS="noatime,rw"
SLEEP=1
@nesquena
nesquena / linode_fog.rb
Created October 28, 2011 09:24
Linode and Fog Samples
## DNS
@dns = Fog::DNS.new(:provider => 'Linode', :linode_api_key => LINODE_KEY)
if @zone = @dns.zones.all.find { |z| z.domain == ZONE }
puts "Found zone #{@zone.inspect}"
else
@zone = @dns.zones.create(:domain => ZONE, :email => ZONE_EMAIL)
puts "Creating zone #{@zone.inspect}"
end
@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes: