View delall-icloud-photos.py
#!/usr/bin/env python
from __future__ import print_function
import json
import sys
from authentication import authenticate
from future.moves.urllib.parse import urlencode
if __name__ == '__main__':
username = sys.argv[1]
View switch_romfs.py
from struct import unpack as up
import sys, os
dirs, files = None, None
def read_at(fp, off, len):
fp.seek(off)
return fp.read(len)
def read_u8(fp, off):
View functions.php
<?php
namespace RomanNumeralParser;
function parse(string $s): int
{
static $map;
if (!$map) {
$map = [
'I' => 1,
'V' => 5,
'X' => 10,
View sharedir.sh
#!/usr/bin/env bash
set -o errexit
cwd=$(pwd -P)
name="nginx-share-$(basename "$cwd")"
#image_name='kitpages/nginx-explorer'
image_name='nginx'
chmod 0755 "$cwd"
find "$cwd" -type f | xargs -d $'\n' chmod -c o+r
find "$cwd" -type d | xargs -d $'\n' chmod -c o+x
View oan.sh
#!/usr/bin/env bash
set -o errexit
TOKEN_FILE="$HOME/.cache/oan-token"
STATION_ID_OAN=1
STATION_ID_AWE=2
STATION_ID_OAN_TRUMP=3
STATION_ID_NEWSMAX=4
STATION_ID_BLAZE=16
STATION_ID_FRANCE24=72
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 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=