THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
" Assuming keyboard_leds is built and available in your PATH, | |
" this will make capslock indicate whether or not you are in insert mode. | |
autocmd InsertEnter * :!keyboard_leds -c1 | |
autocmd InsertLeave * :!keyboard_leds -c0 | |
" To make Vim control the keyboard backlight, use this. | |
" Note that it's glitchy and you'll probably toss the idea soon after. | |
" I can see programmatically controlling the lights to be useful in other cases, though. | |
" Install Lab tick and set a hotkey for Toggle, and one for Brighten. | |
" http://labtick.proculo.de/ |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS
REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
# iPython Notebook with per-user storage and config | |
# | |
# Based on crosbymichael/ipython | |
# Creates a Docker image with IPython Notebook installed. | |
# | |
# It expects to be run like this: | |
# | |
# docker run -v /home/eduard/notebooks/eduard:/notebooks benthoo/ipython-user | |
# | |
# You provide a folder per user on the host system. This folder will hold the users notebooks and also needs to contain the |
#!/usr/bin/env python | |
# jsonenv reads a json object as input and produces | |
# escaped shell commands for setting environment vars | |
import json | |
import pipes | |
import sys | |
for k, v in json.load(sys.stdin).items(): |
One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.
Most workflows make the following compromises:
Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure
flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.
Use production SSL certificates locally. This is annoying
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |
authors: | |
hanzou: | |
name: Hanzou Hattori | |
display_name: Hanzou | |
gravatar: c66919cb194f96c696c1da0c47354a6a | |
email: [email protected] | |
web: http://company.com | |
twitter: company | |
github: hhattori | |
jorgen: |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)