- You can only count on yourself.
- Never reveal more than you have to.
- Execution is nine-tenths of the job.
- Give credit where credit is due.
- When all else fails, do it yourself.
- 90% of a project takes 90% of the time.
- The remaining 10% takes an additional 90% of the time.
- Never date a co-worker.
This file contains 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 php | |
<?php | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\Input\ArrayInput as Input; | |
use Symfony\Component\Console\Input\InputOption as Option; | |
require_once __DIR__.'/../vendor/autoload.php'; | |
/** Outputs and runs a command. */ |
This file contains 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 bash | |
# tlrecode.sh | |
# Decode and encode TP-LINK router config files. | |
# | |
# Creative Commons CC0 License: | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# To the extent possible under law, the person who associated CC0 with this | |
# work has waived all copyright and related or neighboring rights to this work. |
This file contains 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
/** | |
* Draw a line graph in Chrome/Chromium's dev console | |
* Examples: | |
* console.lineGraph([[5, 3], [10, 8], [-10, 1], [7, -3], [3, 0]], 320, 240); | |
* console.lineGraph(Math.sin, 420, 240, -Math.PI, Math.PI, 0.001); | |
* console.lineGraph(function (x) { | |
return [ | |
Math.sqrt(1 - x*x) + Math.abs(x) - 0.75, | |
(Math.abs(x)-Math.sqrt(1 - x*x)) / 2 - 0.25 | |
]; |
This file contains 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
#define _GNU_SOURCE | |
#include <errno.h> | |
#include <sched.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mount.h> | |
#include <sys/stat.h> | |
#include <sys/syscall.h> | |
#include <sys/types.h> |
This file contains 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
/* http://redd.it/2z68di */ | |
#define _BSD_SOURCE // MAP_ANONYMOUS | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#define PAGE_SIZE 4096 |