Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
# start as admin! | |
# prompt for username | |
$SkypeUserName = Read-Host -Prompt "What is your Skype username?" | |
# stop skype-process | |
try{ | |
if(Get-Process | ? {$_.Name -like 'skype'}) {Stop-Process -Name skype} | |
# commit changes to hosts file | |
$hostfile = "C:\Windows\System32\Drivers\etc\hosts" |
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'; |
#!/usr/bin/env bash | |
# | |
# Bootstrap script for setting up a new OSX machine | |
# | |
# This should be idempotent so it can be run multiple times. | |
# | |
# Some apps don't have a cask and so still need to be installed by hand. These | |
# include: | |
# | |
# - Twitter (app store) |
Below are many examples of function hoisting behavior in JavaScript. Ones marked as works
successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js
(I may be using incorrect terms below, please forgive me)
Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213
UPDATE `NEXUS 5`
SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1
WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1
&& `WANNA_KEEP_USERDATA`=1;
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
As of just writing this, Express 4.0 was released and there are points in there that no longer matter. So, this remains as a great >4.0 article.
Node.js is the red-hot new hotness! You can't throw a stick on the internet without hitting someone talking about Node. But why? For one, it's built on JavaScript which is completely ubiquitous. So, why not build a development stack and server on JavaScript? I would argue that the installation is almost painless while the terseness of the language is not.
While you can create apps 100% from Node.js, the Express framework is a great tool that helps you solve many standard problems without having to write boilerplate code.
Node.js is here and it's not going anywhere anytime soon. So if you are new to Node.js, Express, and even JavaScript in general, this is a great newb's step-by-step guide to get started.
function toggleproxy { | |
# checks to see if SOCKS proxy is enabled | |
if [[ $(networksetup -getsocksfirewallproxy Wi-Fi | grep '^Enabled') == "Enabled: No" ]]; then | |
networksetup -setsocksfirewallproxystate Wi-Fi on | |
echo "SOCKS on!" | |
# checks to see if there's an existing SSH tunnel and if not, it starts one | |
if [[ -z $(ps aux | grep '[0-9] ssh -D 8080') ]]; then | |
echo -ne "Don't see a ssh tunnel on 8080 active, starting one now..." | |
ssh -D 8080 -f -C -q -N USERNAME@HOSTNAME.EDU # Change this from the defaults! | |
[[ $? == 0 ]] && echo " success!" || echo " failed :(" |
I frequently administer remote servers over SSH, and need to copy data to my clipboard. If the text I want to copy all fits on one screen, then I simply select it with my mouse and press CMD-C, which asks relies on m y terminal emulator (xterm2) to throw it to the clipboard.
This isn't practical for larger texts, like when I want to copy the whole contents of a file.
If I had been editing large-file.txt
locally, I could easily copy its contents by using the pbcopy
command: