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:
## 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 |
#!/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 |
<cfscript> | |
// Set up the default API response. | |
apiResponse = { | |
"statusCode" = 200, | |
"statusText" = "OK", | |
"contentType" = "application/x-json", | |
"data" = {} | |
}; |
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.
# 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 = <>; |
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:
npm install -g jspm@beta
jspm init
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
vi lib/vagrant-linode/version.rb | |
vi CHANGELOG.md | |
git commit -m 'version 0.1.2' lib/vagrant-linode/version.rb CHANGELOG.md | |
git tag -s v0.1.2 # -u E2D09AB6 | |
git push --tags origin master | |
gem build vagrant-linode.gemspec | |
gem push vagrant-linode-0.1.2.gem |
function createStore (reducers) { | |
var state = reducers() | |
const store = { | |
dispatch: (action) => { | |
state = reducers(state, action) | |
}, | |
getState: () => { | |
return state | |
} | |
} |