In order to do this we need a few things. These will be explained in detail later on.
- The default content (the content which is there when closing the overlay)
- The overlay content
- A return path, i.e. the desired path when closing the overlay
TODO:
When running certain commands like ssh or git within Terminal on OSX you may get notices like the one below, which can be annoying. | |
perl: warning: Setting locale failed. | |
perl: warning: Please check that your locale settings: | |
LANGUAGE = (unset), | |
LC_ALL = (unset), | |
LANG = "en_US.UTF-8" | |
are supported and installed on your system. | |
perl: warning: Falling back to the standard locale ("C"). | |
#!/bin/bash | |
# node-reinstall | |
# credit: http://stackoverflow.com/a/11178106/2083544 | |
## program version | |
VERSION="0.0.13" | |
## path prefix | |
PREFIX="${PREFIX:-/usr/local}" |
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service
add_filter('json_api_encode', 'json_api_encode_acf'); | |
function json_api_encode_acf($response) | |
{ | |
if (isset($response['posts'])) { | |
foreach ($response['posts'] as $post) { | |
json_api_add_acf($post); // Add specs to each post | |
} | |
} |
var ModuleA = require('module-a'); | |
var ModuleB = require('module-b'); | |
var A = new ModuleA("A"), | |
B = new ModuleB("B"); | |
A.foo() // => "foo" | |
A.bar() // => [error] | |
A.getName() // => "A" |
I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!
Install FFmpeg
Install ImageMagick
// | |
// Shake horizontally | |
// | |
// Use: | |
// @include animation(shake-x 1s); | |
// | |
@include keyframes(shake-x) { | |
0%, 100% { | |
@include translateX(0); | |
} |
function sb_init { | |
local RED="\033[0;31m" | |
local NC="\033[0m" | |
if [ ! $# == 1 ]; then | |
echo -e "${RED}Please specify a project name.${NC}" | |
echo -e "Usage: init project-name\n" | |
else | |
if ! type "ruby" > /dev/null; then | |
echo -e "${RED}Please install Ruby:${NC}" |