This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
if [ -z "$1" ]; then | |
cat <<'EOF' | |
Usage: | |
./set_video_metadata_date_created.sh '/absolute/path/to/video/file.mp4' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this function to your browser’s JavaScript console, | |
// and then run it, passing in a CSS selector, eg: | |
// > pseudolocalize('body') | |
var pseudolocalize = function pseudolocalize(arg){ | |
if(typeof arg === 'string'){ | |
var elements = document.querySelectorAll(arg); | |
for(var i=0, len=elements.length; i<len; i++){ | |
pseudolocalize(elements[i]); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Progressively enhances a load of slides, so they can be flicked through like a carousel --> | |
<!-- Assumes only one .js-slide per page, and jQuery available --> | |
<!-- Untested! --> | |
<style> | |
.js-slide { display: none } | |
.js-slide:first-child { display: block } | |
</style> | |
<div class="js-slides"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/" for 10.10.10.1 at 2015-11-16 13:04:28 +0000 | |
Processing by GeneralController#frontpage as */* | |
Xapian query (0.00022s) Search: variety:response (status:successful OR status:partially_successful) | |
InfoRequestEvent Load (0.5ms) SELECT "info_request_events".* FROM "info_request_events" WHERE (info_request_events.id in ('908','906','913')) | |
InfoRequest Load (0.4ms) SELECT "info_requests".* FROM "info_requests" WHERE "info_requests"."id" IN (105, 106, 108) | |
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" IN (1, 5) | |
PublicBody Load (0.4ms) SELECT "public_bodies".* FROM "public_bodies" WHERE "public_bodies"."id" IN (3, 5, 6) | |
CensorRule Load (0.3ms) SELECT "censor_rules".* FROM "censor_rules" WHERE "censor_rules"."info_request_id" IN (105, 106, 108) ORDER BY created_at desc | |
Xapian query (0.00016s) Search: variety:sent | |
InfoRequestEvent Load (0.4ms) SELECT "info_request_events".* FROM "info_request_events" WHERE (info_request_events.id in ('916','904')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Assumes a file called mailman.txt in the working directory, | |
# generated by: `list_members -p -f -n enabled -o ~/mailman.txt news` | |
import csv | |
import re | |
with open('exported.tsv', 'wb') as csvfile: | |
csvwriter = csv.writer(csvfile, delimiter="\t") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Work/mysociety/sayit.mysociety.org:zarinozappia ⌘ git ls-files -v | |
H .gitignore | |
H .tx/config | |
H LICENSE.txt | |
H README.md | |
H about/__init__.py | |
H about/models.py | |
H about/templates/about/charles-taylor/index.html | |
H about/templates/about/leveson/index.html | |
H about/templates/about/shakespeare/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Work/mySociety/popit:zarinozappia ⌘ make test | |
compass clean | |
remove .sass-cache/ | |
remove public/css/docs.css | |
remove public/css/foundicons/general_foundicons.css | |
remove public/css/foundicons/general_foundicons_ie7.css | |
remove public/css/ie.css | |
remove public/css/popit.css | |
remove public/css/print.css | |
rm -rf public/css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/mysociety/popit:zarinozappia ⌘ npm rebuild | |
> [email protected] install /Users/zarinozappia/Work/mySociety/popit/node_modules/bcrypt | |
> node-gyp rebuild | |
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o | |
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o | |
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o | |
SOLINK_MODULE(target) Release/bcrypt_lib.node | |
SOLINK_MODULE(target) Release/bcrypt_lib.node: Finished |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
if test -z "${REAL_OPT_DIR}"; then | |
# next line to be replaced according to OPTWARE_TARGET | |
REAL_OPT_DIR=/volume1/@optware | |
fi | |
case "$1" in | |
start) | |
echo "Starting Optware." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Optware setup | |
[ -x /etc/rc.optware ] && /etc/rc.optware start |
NewerOlder