Last updated: 12/31/2013
- Edit
/etc/default/localeas sudo. - Append
LC_ALL="en_US.UTF-8"at the end of the file, save and quit. sudo locale-gen en_US en_US.UTF-8sudo dpkg-reconfigure locales
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| #!/bin/bash | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| for file in $DIR/../English.lproj/*.xib | |
| do | |
| basename=$(echo $file | rev | cut -d/ -f1 | rev) | |
| stringname=$(echo $basename | sed "s/.xib/.strings/") | |
| en="English.lproj/$stringname" |
| [ | |
| { "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
| { "keys": ["ctrl+tab"], "command": "next_view" } | |
| ] |
Last updated: 12/31/2013
/etc/default/locale as sudo.LC_ALL="en_US.UTF-8" at the end of the file, save and quit.sudo locale-gen en_US en_US.UTF-8sudo dpkg-reconfigure localesWhen hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| " A minimal vimrc for new vim users to start with. | |
| " | |
| " Referenced here: http://vimuniversity.com/samples/your-first-vimrc-should-be-nearly-empty | |
| " | |
| " Original Author: Bram Moolenaar <[email protected]> | |
| " Made more minimal by: Ben Orenstein | |
| " Modified by : Ben McCormick | |
| " Last change: 2014 June 8 | |
| " | |
| " To use it, copy it to |
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
This tutorial explains how to host your static website on Amazon Web Service S3 with your custom domain name on gandi (or on any other registrar).
The name of the bucket should be your domain name:
example.com
Go to bucket properties, then Static website hosting and select enable website hosting. Index document should be index.html.
Click save
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |