This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
alias delgenvenv="current_env=`pwd | sed -nr 's#^.*?/([^/]+)$#\1#p'` \ | |
&& echo \"destroy virtualenv $current_env\" \ | |
&& (deactivate || echo 'skip deactivate') \ | |
&& (rm -Rf ~/.virtualenvs/$current_env/ || echo 'skip rm') \ | |
&& virtualenv ~/.virtualenvs/$current_env \ | |
&& source ~/.virtualenvs/$current_env/bin/activate \ | |
&& pip install -r requirements.txt" |
This file contains 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
# Use RTL unicode to trick QrCode reader | |
# Idea from Dylan Katz: https://twitter.com/Plazmaz | |
import qrcode | |
qr = qrcode.QRCode( | |
version=1, | |
error_correction=qrcode.constants.ERROR_CORRECT_L, | |
box_size=10, | |
border=4, | |
) |
This file contains 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
import base64 | |
print(base64.b64encode(''.join(['{:08b}'.format(ord(c))for c in input()[::-1]]).encode('ascii')).decode('ascii')) | |
#decode | |
#s=base64.b64decode(input());print(''.join([chr(int(s[i:i+8],2))for i in range(0,len(s),8)][::-1])) |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
This file contains 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
Entités publiques | |
PASSAGE (LE) (38490 - LE PASSAGE) | |
A.C.T.I.S GRENOBLE (38000 - GRENOBLE) | |
A.GE.D.I (77440 - DHUISSY) | |
ABAUCOURT HAUTECOURT (55400 - ABAUCOURT HAUTECOURT) | |
ABRESCHVILLER (57560 - ABRESCHVILLER) | |
ABRETS (LES) (38490 - LES ABRETS) | |
ADINFER (62116 - ADINFER) | |
ADRETS (LES) (38190 - LES ADRETS) | |
ADULLACT (34000 - Montpellier) |
This file contains 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
for (o, url) in [(x, os.getxattr(x, 'user.xdg.origin.url')) for x in os.listdir('.') if 'user.xdg.origin.url' in os.listxattr(x)]: print(o, url) |
This file contains 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
var googleCodeDecode = function (e) { | |
return JSON.parse(atob(e.replace(/[-_]/g, function(e) { return "-" == e ? "+" : "/" }).replace(/[^A-Za-z0-9\+\/]/g, ""))); | |
} | |
var googleCodeEncode = function (e) { | |
return btoa(JSON.stringify(e)).replace(/[+/]/g, function(e) { return "+" == e ? "-" : "_" }).replace(/[^A-Za-z0-9\+\/]/g, ""))); | |
} | |
params = {"min_rank": 1, "num_consecutive_users": 100}; | |
// url example to get the first 100 results: |
This file contains 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
{ | |
"cookie": { | |
"route": "cfd2bfd3459b299d8a4ed95df56eda81", | |
"xtvrn": "$486404$", | |
"__trossion": "1571692868_1800_1__aafa479d-4d93-445a-a529-5831f28b43ad%3A1571692868_1571692868_1", | |
"__troRUID": "aafa479d-4d93-445a-a529-5831f28b43ad", | |
"__troSYNC": "1" | |
}, | |
"localStorage": {}, | |
"scripts": [ |
This file contains 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/bash | |
for i in {1..1000}; do | |
line="$(date +'%F %T') $(ping -c 25 193.252.148.140|tail -n 2|tr '\n' '\t')"; | |
echo $line >> ~/sfr_ping.txt; | |
echo $line; | |
done |
This file contains 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
$ cat /etc/xdg/autostart/solaar.desktop | |
[Desktop Entry] | |
Name=Solaar | |
Comment=Logitech Unifying Receiver peripherals manager | |
Exec='solaar --window=hide' | |
Icon=solaar | |
StartupNotify=false | |
Terminal=false | |
Type=Application | |
Keywords=logitech;unifying;receiver;mouse;keyboard; |
OlderNewer