Skip to content

Instantly share code, notes, and snippets.

View test-repo-in-autoland.md

Set hosting service to "hmo" Patch config update sqlite

@zalun
zalun / flactomp3.sh
Last active Oct 24, 2016
FLAC to MP3
View flactomp3.sh
#!/bin/bash
for a in ./*.flac; do ffmpeg -i "$a" -qscale:a 0 "$a.mp3"; done
@zalun
zalun / writeSD.sh
Created Sep 17, 2016
write image to SD
View writeSD.sh
diskutil list
diskutil unmount (/dev/disk2s1)
dd if=(image) of=(/dev/disk2) bs=1m
View Updating in mercurial
hg up @ && hg pull -u
hg up bug-1248008 && hg rebase -d @
View fiddle.css
#colorpickers {
display: inline-table;
}
#colorpickers:before, #colorpickers:after {
content:"";
display: table;
}
#colorpickers:after {
clear:both;
}
@zalun
zalun / index.html
Created Sep 20, 2013
index.html and js for PGDay example
View index.html
<!DOCTYPE html>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
View serveapp.py
import SimpleHTTPServer
import SocketServer
SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.webapp'] = 'application/x-web-app-manifest+json'
SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map['.manifest'] = 'application/x-web-app-manifest+json'
httpd = SocketServer.TCPServer(("", 3000), SimpleHTTPServer.SimpleHTTPRequestHandler)
print 'serving from http://localhost:3000/'
httpd.serve_forever()
View fiddle.response.html
<html><head><script>alert('wtf')</script></head></html>
View fiddle.css
$fullred: #ff0000;
body {
font-family: Helvetica, Verdana
}
p {
padding: 7px 10px;
}
#demo {
border: 1px solid $fullred;
}