Skip to content

Instantly share code, notes, and snippets.

@epicfaace
epicfaace / node-and-npm-in-30-seconds.sh
Last active November 26, 2017 04:48 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir local
mkdir node-latest-install
cd node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix="$(dirname "$(pwd)")/local" # up a directory and down to local.
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@epicfaace
epicfaace / qb-scrape.sh
Last active June 13, 2017 15:53 — forked from matt2718/qb-scrape.sh
Scrape quiz bowl packets
#!/bin/bash
# change these depending on where you want to pull from
# for the hs archive, the URL should be 'http://www.quizbowlpackets.com'
baseurl='http://collegiate.quizbowlpackets.com'
outdir='collegiate'
curl -s $baseurl | # get index page
grep '<SPAN class="Name">' | # extract lines containing packet links
sed -e 's/^.*href="//' -e 's/">/*/' -e 's/<\/a>.*$//' | # parse url and name
@epicfaace
epicfaace / img-zoom.html
Last active May 9, 2017 13:00 — forked from vazad28/img-zoom.html
Page code for image pinch and zoom in ionic RC3. I used code from multiple places and credit is due. I cant seem to find the pages I have used the code from. If you know, please tell me so I can add that here.
<ion-header no-shadow>
<ion-navbar no-border-bottom>
<ion-buttons start>
<button ion-button color="light" (click)="closeModal()">Cancel</button>
</ion-buttons>
<ion-title>Media</ion-title>
<ion-buttons end>
<ion-spinner *ngIf="!mediaLoaded" color="light"></ion-spinner>
</ion-buttons>
ffmpeg -i sourcemovie.mov -vcodec libx264 -b 400k -g 250 -keyint_min 24 -bf 16 -coder 1 -refs 6 -flags +loop -deblockbeta -6 -partitions +parti4x4+parti8x8+partp8x8+partb8x8 -flags2 +dct8x8+mixed_refs+wpred+bpyramid -me_method umh -subq 8 -s 640x360 -acodec libfaac -ar 44100 -ab 96k -threads 6 -f mp4 outputmovie.mp4