$ convert your.jpg -transparent white your.png
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
| /** | |
| * Fancy ID generator that creates 20-character string identifiers with the following properties: | |
| * | |
| * 1. They're based on timestamp so that they sort *after* any existing ids. | |
| * 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
| * 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
| * 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
| * latter ones will sort after the former ones. We do this by using the previous random bits | |
| * but "incrementing" them by 1 (only in the case of a timestamp collision). | |
| */ |
- Set Audacity to use the External mic.
- Ensure you're recording in 16-bit PCM + 44100Hz.
- Do a sound check, record everyone in the room speaking. You want the lighter part of the meter bar (the green or red bar at the top) to bounce between -12db and -6db while people are talking. It's hard to achieve this... so just settle for as close as you can get, without the bars going off the scale :)
- Play it back and tweak levels until it sounds good @ 60% speaker volume.
- Save the Project BEFORE recording live :D (prevents quality issues)
- Join recordings to one track.
- Listen to it + Edit bad content out.
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
| var child_process = require('child_process'), | |
| http = require('http'); | |
| url = require('url'), | |
| ffmpeg = null; | |
| var livestream = function (req, resp) { | |
| // For live streaming, create a fragmented MP4 file with empty moov (no seeking possible). | |
| var input = 'udp://225.1.1.1:8208'; |
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
| <?php | |
| $a=$_REQUEST['txt1']; | |
| $b=$_REQUEST['txt2']; | |
| class compareImages | |
| { | |
| private function mimeType($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
| _dig() { | |
| local domain=$1; | |
| local type=$2; | |
| dig "$domain" -t "$type" \ | |
| | sed -n '/;; ANSWER SECTION/,/^$/p' \ | |
| | sed '1d' \ | |
| | sed '/^$/d'; | |
| } |
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
| # req: prips | |
| curl https://ip-ranges.amazonaws.com/ip-ranges.json \ | |
| | grep -B 2 CLOUDFRONT \ | |
| | grep 'ip_prefix' \ | |
| | awk '{ print $2 }' \ | |
| | tr -d '",' \ | |
| | xargs -I{} prips {} |
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
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns | |
| Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
| Read 4K randomly from SSD* 150,000 ns 0.15 ms |
Lodash has a sweet feature called a mixin that lets you alias function names. Below here I alias names that we're used to using in SQL to (roughly) equivalent functions in lodash.
_.mixin({
select: _.map,
from: _.chain,
where: _.filter,
groupBy: _.sortByOrder,
})
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
| /** @jsx hype */ | |
| function render(root, el) { | |
| while (root.lastChild) { | |
| root.removeChild(root.lastChild); | |
| } | |
| root.appendChild(el); | |
| } | |
| function hype(name, attributes, ...children) { |