Skip to content

Instantly share code, notes, and snippets.

View loicpirez's full-sized avatar
:shipit:

Loïc PIREZ loicpirez

:shipit:
  • Paris, France
View GitHub Profile
@loicpirez
loicpirez / keybase.md
Created April 21, 2017 20:26
keybase.md

Keybase proof

I hereby claim:

  • I am loicpirez on github.
  • I am loicp (https://keybase.io/loicp) on keybase.
  • I have a public key whose fingerprint is 7E0C 1FC5 687B 73AC D626 55B1 41E9 2773 BD71 CBEC

To claim this, I am signing this object:

@loicpirez
loicpirez / cloudSettings
Last active January 28, 2019 02:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-01-28T02:06:30.390Z","extensionVersion":"v3.2.4"}
@loicpirez
loicpirez / .hyper.js
Created June 11, 2018 09:51
Hyper JS
console.log('test')
clock=1
calendar=1
filesgo=1
search=1
assistant=1
print=1
calculator=1
mtp=1
bluelightfilter=1
smartmanager=1
@loicpirez
loicpirez / get_youtube_history.rb
Last active June 24, 2018 16:53
Quick and dirty ugly script to get YouTube History playlist into a JSON. You need to extract the history page as an HTM file with Chrome and rename it 'history.htm' in same folder of script. Note that this is for French version of YouTube. Tweak it to fill your need, needed to have a quick result.
#!/usr/bin/env ruby
require 'json'
require 'nokogiri'
html = File.read('history.htm')
page = Nokogiri::HTML(html)
uniq_results = []
results = []
@loicpirez
loicpirez / ignore_vpn_china_ip.sh
Last active September 18, 2018 07:00
Script to ignore Chinese IPs on VPN. (macOS)
DEFAULT_GATEWAY="$(netstat -nr|grep default|head -n 1|awk '{print $2}')"
route delete -net 10.0.0.0/8 -ifp en0
route -nv add 10.0.0.0/8 $DEFAULT_GATEWAY
route delete -net 1.24.0.0/13 -ifp en0
route -nv add 1.24.0.0/13 $DEFAULT_GATEWAY
route delete -net 1.48.0.0/15 -ifp en0
route -nv add 1.48.0.0/15 $DEFAULT_GATEWAY
route delete -net 1.50.0.0/16 -ifp en0
route -nv add 1.50.0.0/16 $DEFAULT_GATEWAY
route delete -net 1.56.0.0/13 -ifp en0