Skip to content

Instantly share code, notes, and snippets.

View diewland's full-sized avatar
🧩
Jigsaw Fam

diewland.eth diewland

🧩
Jigsaw Fam
View GitHub Profile
@ColinHarrington
ColinHarrington / .gitconfig
Created January 18, 2012 17:37
git aliases
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
@dashr
dashr / tumblr.caman.bfly.xing.js
Created September 2, 2012 00:34
CamanJS greyscale + trans png overlay on all post images
<script type="text/javascript">
$(document).ready(function(){
$('.photo img').each(function() {
Caman( this, function () {
this.greyscale();
this.newLayer(function () {
this.setBlendingMode('normal');
this.opacity(100);
@mortehu
mortehu / google-cloud-storage-list.py
Created April 16, 2015 15:18
Minimal Google Cloud Storage API Python example
#!/usr/bin/env python
"""Sample Google Cloud Storage API client.
Based on <https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples>,
but removed parts that are not relevant to the Cloud Storage API.
Assumes the use of a service account, whose secrets are stored in
$HOME/google-api-secrets.json"""
@kig
kig / jsdecode.html
Created November 6, 2015 04:34
Buggy feature-free JavaScript QR decoder
<html>
<body>
<script>
var QRDecoder = function(imageData) {
this.imageData = imageData;
this.imageBits = new Int8Array(QRDecoder.MAX_SIZE * QRDecoder.MAX_SIZE);
this.decodedBits = new Uint8Array( (QRDecoder.MAX_SIZE * QRDecoder.MAX_SIZE) >> 3 );
this.size = -1;
this.ecc = -1;
@matiaskorhonen
matiaskorhonen / gist:3013808
Created June 28, 2012 20:44
Chrome for iOS user-agents

Chrome for iOS user-agents

iPhone

Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1_1 like Mac OS X; en-gb)
AppleWebKit/534.46.0 (KHTML, like Gecko)
CriOS/19.0.1084.60 Mobile/9B206 Safari/7534.48.3

@fukuroder
fukuroder / Main.hx
Last active April 25, 2019 14:06
Local audio file player using Web Audio API (Haxe/JS) >>> http://fukuroder.sakura.ne.jp/gist/9981854
package ;
import js.Browser;
import js.html.audio.*; // Web Audio API
import js.html.File;
import js.html.FileReader;
import js.html.InputElement;
import js.JQuery;
import js.Lib;
@congnt24
congnt24 / konga.yaml
Created August 19, 2018 08:02
Install Konga on Kubernetes cluster
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: konga
spec:
replicas: 1
template:
metadata:
labels:
name: konga
@eyecatchup
eyecatchup / how-to-install.txt
Last active November 17, 2019 17:43
Instructions how to install (and run) "Leapcast" on Windows.
1. Download https://github.com/dz0ny/leapcast/archive/master.zip
2. Extract zip to C:\leapcast
3.1 Download Python 2.7:
x86: http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi
x64: http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi
3.2 Install Python to C:\Python27
NOTE: If you have a newer version, install 2.7.5 and edit the environment variable and change for example "C:\Python33" to "C:\Python27".
4.1 Download Setuptools here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
@xavierlepretre
xavierlepretre / expected_exception_testRPC_and_geth.js
Last active November 28, 2019 17:57
When TestRPC and Geth throw, they behave in a different manner. This Gist is an example on how to cover such a situation.
"use strict";
/**
* @param {!Function.<!Promise>} action.
* @param {!Number | !string | !BigNumber} gasToUse.
* @returns {!Promise} which throws unless it hit a valid error.
*/
module.exports = function expectedExceptionPromise(action, gasToUse) {
return new Promise(function (resolve, reject) {
try {
@NicoSB
NicoSB / basic-card.json
Last active June 13, 2020 23:10
Actions on Google Conversation API v2 - Sample Responses
{
"items": [
{
"simpleResponse": {
"textToSpeech":"This is the first simple response for a basic card"
}
},
{
"basicCard": {
"title":"Title: this is a title",