Skip to content

Instantly share code, notes, and snippets.

View tjarksaul's full-sized avatar
🦄

Tjark Saul tjarksaul

🦄
View GitHub Profile
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<?php
header('Content-type: application/json');
print (new JSONCreator)->getJSON();
class JSONCreator
{
private $files;
public function __construct()
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
$ curl https://www.scrumalliance.org/login -k -D - -o /dev/null -s
HTTP/1.1 200 OK
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: text/html; charset=utf-8
Date: Tue, 05 Aug 2014 10:48:33 GMT
Expires: -1
Pragma: no-cache
Set-Cookie: X-Mapping-fjhppofk=EE6DED1B556EAB0AB4FD99E5F9C32151; path=/
@tjarksaul
tjarksaul / gist:2f7b7cec600f16807125
Created August 7, 2014 09:08
elro_he system and unit codes for pilight
system code:
5 = 2^4
4 = 2^3
3 = 2^2
2 = 2^1
1 = 2^0
unit code:
E = 2^4
D = 2^3
+-----+-----+---------+------+---+--B Plus--+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 0 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | OUT | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
bash-3.2$ ./exit.sh
bash-3.2$ echo $?
38
bash-3.2$ cat exit.sh
#!/bin/bash
exit 2342
const int main[] = {
-443987883, 440, 113408, -1922629632,
4149, 899584, 84869120, 15544,
266023168, 1818576901, 1461743468, 1684828783,
-1017312735
};
// Check for wrong values
if (trim($params["data"]["fileName"]) == "") $this->errors["fileName"] = true;
@tjarksaul
tjarksaul / gist:243cf3f263755eb33e98
Created February 24, 2015 12:15
Create bootable stick from .iso on OS X
# HOWTO: Make bootable USB stick from ISO on OSX
# determine /dev/diskN name of USB stick (e.g. /dev/disk2)
diskutil list
# convert image.iso to image.dmg (hdiutil adds .dmg automatically)
hdiutil convert -format UDRW -o image image.iso
# unmount (don't eject!) usb stick
diskutil unmountDisk /dev/disk2
# don't f*** up device name in next step or your disk will be toast
sudo dd if=image.dmg of=/dev/disk2 bs=10m
# unmount usb stick again and use in target system