This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
#!/bin/sh | |
# eps2svg: EPS to SVG vector command line image converter | |
# David Griffith <[email protected]> | |
# Created March 30, 2009 and released into the public domain | |
# The programs pstoedit and skencil are required. | |
EXT="svg" | |
USAGE="usage: eps2svg [-v] input.eps [output.svg]\n -v verbose mode" |
#!/bin/sh | |
# before running this script, run the following command | |
# wget --save-cookies cookies.txt --post-data 'feed_id=****ID****&password=****PASS****' http://getpocket.com/login_process/ | |
i=1 | |
while [ $i -le 60 ] | |
do | |
wget --load-cookies cookies.txt -p http://getpocket.com/unread/$i | |
(( i++ )) |
This is a plugin meant for Jekyll.
Example use:
Easily embed a YouTube video. Just drop this file in your _plugins
directory.
{% youtube oHg5SJYRHA0 %}
var util = require('util') | |
, Transform = require('stream').Transform | |
, StreamCombiner = require('./streamcombiner'); | |
var chunks1 = []; | |
var stream1 = new Transform(); | |
var soFar = ''; | |
stream1._transform = function(chunk, encoding, done) { | |
chunks1.push(chunk.toString()); | |
var pieces = (soFar + chunk).split('\n'); |
{ | |
"a": 8.167, | |
"b": 1.492, | |
"c": 2.782, | |
"d": 4.253, | |
"e": 12.702, | |
"f": 2.228, | |
"g": 2.015, | |
"h": 6.094, | |
"i": 6.966, |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
#!/bin/bash | |
pacman -S nginx | |
export JAIL=/srv/http | |
# Create Necessary Devices | |
mkdir $JAIL/dev | |
mknod -m 0666 $JAIL/dev/null c 1 3 | |
mknod -m 0666 $JAIL/dev/random c 1 8 | |
mknod -m 0444 $JAIL/dev/urandom c 1 9 |
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
# Python 2.6's urllib2 does not allow you to select the TLS dialect, | |
# and by default uses a SSLv23 compatibility negotiation implementation. | |
# Besides being vulnerable to POODLE, the OSX implementation doesn't | |
# work correctly, failing to connect to servers that respond only to | |
# TLS1.0+. These classes help set up TLS support for urllib2. | |
class TLS1Connection(httplib.HTTPSConnection): | |
"""Like HTTPSConnection but more specific""" | |
def __init__(self, host, **kwargs): | |
httplib.HTTPSConnection.__init__(self, host, **kwargs) |
# config to don't allow the browser to render the page inside an frame or iframe | |
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | |
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | |
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | |
add_header X-Frame-Options SAMEORIGIN; | |
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | |
# to disable content-type sniffing on some browsers. | |
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |