create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#------------------------------------------------------------------------ | |
# encoding: utf-8 | |
# @(#)product_generator.rb 1.00 29-Nov-2011 16:38 | |
# | |
# Copyright (c) 2011 Jim Pravetz. All Rights Reserved. | |
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) | |
# | |
# Description: A generator that creates product, products and | |
# ingredients pages for jekyll sites. Uses a JSON data | |
# file as the database file from which to read and |
var querystring = require('querystring'); | |
var original = 'http://example.com/product/abcde.html'; | |
var escaped = querystring.escape(original); | |
console.log(escaped); | |
// http%3A%2F%2Fexample.com%2Fproduct%2Fabcde.html | |
var unescaped = querystring.unescape(escaped); | |
console.log(unescaped); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf
File locations:
nginx.conf
to /usr/local/etc/nginx/
default.conf
and default-ssl.conf
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
url_sq : s small square 75x75 | |
url_q : q large square 150x150 | |
url_t : t thumbnail, 100 on longest side | |
url_s : m small, 240 on longest side | |
url_n : n small, 320 on longest side | |
url_m : - medium, 500 on longest side | |
url_z : z medium 640, 640 on longest side | |
url_c : c medium 800, 800 on longest side† | |
url_l : b large, 1024 on longest side* | |
url_o : o original image, either a jpg, gif or png, depending on source format |
// There's some better solutions in the comments, so scroll down and see how other folks have improved this! | |
// USAGE: | |
// abbrState('ny', 'name'); | |
// --> 'New York' | |
// abbrState('New York', 'abbr'); | |
// --> 'NY' | |
function abbrState(input, to){ | |
@servers([ 'remote' => 'server.example.com', ]) | |
@setup | |
if ( ! isset($repo) ) | |
{ | |
throw new Exception('--repo must be specified'); | |
} | |
if ( ! isset($base_dir) ) | |
{ |
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality | |
function get_window_under_mouse() | |
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it | |
-- and breaks itself | |
local _ = hs.application | |
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition()) | |
local my_screen = hs.mouse.getCurrentScreen() |
Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.
The basic idea is that C:\Program Files\Git\mingw64\
is your /
directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git
, the mingw64
in this directory is your root. Find it by using pwd -W
).
If you go to that directory, you will find the typical linux root folder structure (bin
, etc
, lib
and so on).
If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so