Skip to content

Instantly share code, notes, and snippets.

View yoannmoinet's full-sized avatar
🐶
DX and Tooling

Yoann Moinet yoannmoinet

🐶
DX and Tooling
View GitHub Profile
@yoannmoinet
yoannmoinet / browserWindow.js
Last active December 19, 2017 13:06
Show devtools for browser windows.
const newWindow = new BrowserWindow({
webPreferences: {
devTools: !IS_PRODUCTION
}
});
@yoannmoinet
yoannmoinet / .block
Created July 29, 2020 09:13 — forked from steveharoz/.block
d3-force testing ground
license: gpl-3.0
height: 1030
scrolling: yes
@yoannmoinet
yoannmoinet / change-dns.sh
Last active March 24, 2023 13:58
Bash functions to change DNS from terminal.
function setGoogleDNS() {
CHANNEL=`route get google.com | grep interface | sed -n -e 's/^.*interface: //p'`
NETWORK=`networksetup -listnetworkserviceorder | grep $CHANNEL | sed -n -e 's/^.*Port: //p' | sed -n -e 's/,.*//p'`
echo "Setting Google's DNS on channel '$CHANNEL' for network '$NETWORK'."
sudo networksetup -setdnsservers $NETWORK 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
}
function setCloudflareDNS() {
CHANNEL=`route get google.com | grep interface | sed -n -e 's/^.*interface: //p'`
NETWORK=`networksetup -listnetworkserviceorder | grep $CHANNEL | sed -n -e 's/^.*Port: //p' | sed -n -e 's/,.*//p'`