View jpeg_rotate_with_exif_on_save_patch.py
import logging
import sys
from PIL import Image, JpegImagePlugin
from PIL.JpegImagePlugin import JpegImageFile
import six
__all__ = [
'ApplyOrientationError',
'Image',
View PythonBuiltInFunctions.php
<?php
namespace PythonBuiltInFunctions;
function all($x)
{
foreach ($x as $v) {
if (!$v) {
return false;
}
}
View github-helvetica.user.js
// ==UserScript==
// @name GitHub Helvetica
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Replace system font in CSS with Helvetica
// @author You
// @match https://github.com/*
// @match https://gist.github.com/*
// @match https://*.github.com/*
// @grant none
View coveralls-no-caps.user.js
// ==UserScript==
// @name Coveralls no-all-caps
// @namespace http://tat.sh/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://coveralls.io/*
// @grant none
// ==/UserScript==
View random.sh
curl 'https://<hostname>/rtorrent/plugins/multirpc/action.php' \
-H 'Pragma: no-cache' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Accept-Language: en-US,en;q=0.8,en-GB;q=0.6' \
-H 'Authorization: <>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json, text/javascript, */*; q=0.01' \
-H 'Cache-Control: no-cache' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Connection: keep-alive' \
View rpmunpack.sh
if ! command -v rpmunpack >/dev/null 2>&1; then
# For OS X
# Credit http://stackoverflow.com/a/27694039
__rpm2cpio_data() {
local -r rpm="$1"
local -r leadsize=96
local -r brpm=$(basename "${rpm%.*}")
local o=$((leadsize + 8))
local headersize=
local extractor=
View ssh-keychain.bash
# SSH/GPG agent via keychain
_keychain=0
if command -v keychain >/dev/null 2>&1; then
systemd_arg=
agents=
[ -d ~/.ssh ] && agents=ssh
command -v systemctl >/dev/null 2>&1 && systemd_arg='--systemd'
command -v gpg-agent >/dev/null 2>&1 && ([ -n "$agents" ] && agents="$agents,gpg") || agents=gpg
[ -n "$DISPLAY" ] && command -v ksshaskpass >/dev/null 2>&1 && export SSH_ASKPASS=ksshaskpass
eval "$(find ~/.ssh/ -name '*sa' -print0 | xargs -0 keychain -q $systemd_arg --eval --agents $agents 2>/dev/null)" && \
View scss.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Kate SCSS syntax highlighting definition
Modified the Kate CSS syntax highlighting definition to support SCSS.
This file should be merged with any updates to the normal Kate CCS definition (see note on version numbering in changelog for 1.2.03.0).
The latest version of this file can be found at https://gist.github.com/958598
View build-ios.sh
#!/usr/bin/env bash
IOS_BASE_SDK="7.0"
IOS_DEPLOY_TGT="5.1"
LIPO="xcrun -sdk iphoneos lipo"
setenv_all()
{
# Add internal libs
export CFLAGS="-O2 -DTARGET_OS_IPHONE=1 -Idependencies/include -Ldependencies/lib $CFLAGS"
View burn-cdi.sh
#!/usr/bin/env bash
CDIIMG="$1"
cdirip "${CDIIMG}" -cdrecord
COUNTER="0"
MORE=true
while $MORE