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
// 1. Open the browser developper console on the network tab | |
// 2. Start the video | |
// 3. In the dev tab, locate the load of the "master.json" file, copy its full URL | |
// 4. Run: node vimeo-downloader.js "<URL>" | |
// 5. Combine the m4v and m4a files with mkvmerge | |
const fs = require('fs'); | |
const url = require('url'); | |
const https = require('https'); |
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
$curl = curl_init(); | |
$url = 'http://www.url_you_want_to_scrape.com'; | |
$username = 'username'; // substitute your PIA PPTP/L2TP/SOCKS username (different from regular PIA username) | |
$password = 'password'; // substitute your PIA PPTP/L2TP/SOCKS password (different from regular PIA password) | |
$pia_url = 'proxy-nl.privateinternetaccess.com:1080'; // current one should be here: https://helpdesk.privateinternetaccess.com/hc/en-us/articles/236265587-Can-I-Use-SOCKS5- | |
curl_setopt_array($curl, array( | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_URL => $url, | |
CURLOPT_PROXYTYPE => CURLPROXY_SOCKS5, | |
CURLOPT_PROXY => 'socks5://' . $username . ':' . $password . '@' . $pia_url, |
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
#!/usr/bin/env bash | |
# fresh-chrome | |
# | |
# Use this script on OS X to launch a new instance of Google Chrome | |
# with its own empty cache, cookies, and user configuration. | |
# | |
# The first time you run this script, it will launch a new Google | |
# Chrome instance with a permanent user-data directory, which you can | |
# customize below. Perform any initial setup you want to keep on every |
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
#!/bin/sh -x | |
START_DIR=$CWD | |
SHARE_DIR=/backup001/chem/home/chem/src/mfsbsd | |
KEYBOARD=dvorak | |
WANT_PHORONIX_TEST_SUITE=4.4.1 # set it to no to disable | |
# catch error from my own error function even in subshell. | |
err_handler () | |
{ | |
rc=$? |
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
int64_t ipow(int64_t base, uint8_t exp) { | |
static const uint8_t highest_bit_set[] = { | |
0, 1, 2, 2, 3, 3, 3, 3, | |
4, 4, 4, 4, 4, 4, 4, 4, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
5, 5, 5, 5, 5, 5, 5, 5, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 6, | |
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1 |