Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| /* | |
| This is the implementation in JS of the Vigenere cypher to solve EFF puzzle: | |
| https://www.eff.org/deeplinks/2014/08/effs-defcon-22-t-shirt-puzzle-explained | |
| */ | |
| String.prototype.charOrdinalCodeAt = function(pos){ | |
| /* | |
| This function returns this values: | |
| * -1 if the character at position pos is not a letter; | |
| * if the character at position pos is a letter it returns the positional value in alphabet, for lower case letter it returns its positional value + 26, for example: |
| import re | |
| def elff(filename): | |
| f = open(filename, "r") | |
| s=f.read() | |
| f.close() | |
| regex = re.compile(r'"(http[^"]*)"') | |
| links = regex.findall(s) | |
| return links | |
| def savefile(filename, s): |
| if (location == "chrome://messenger/content/messenger.xul") { | |
| /* Aggiungo l'accel text nella voce di menu */ | |
| document.getElementById('viewWatchedThreadsWithUnreadMenuItem').setAttribute('acceltext', 'Maiusc+W'); | |
| /* Seleziono il main keyset dove sono inserite le scorciatoie da tastiera */ | |
| let ks = document.getElementById('mailKeys'); | |
| /* Creo una nuova chiave */ | |
| let nk = document.createElement('key'); | |
| nk.setAttribute('id', 'key_viewwatchedthreadwithunread'); | |
| nk.setAttribute('modifiers','shift'); | |
| nk.setAttribute('keycode', 'w'); |
| @echo off | |
| REM Reference: http://www.techrepublic.com/forum/questions/101-215911/dos-command-to-list-all-installed-programs | |
| echo ================= >>software_list.txt | |
| reg export HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall temp1.txt | |
| find "DisplayName" temp1.txt| find /V "ParentDisplayName" > temp2.txt | |
| for /f "tokens=2,3 delims==" %%a in (temp2.txt) do (echo %%a >> software_list.txt) | |
| del temp1.txt | |
| del temp2.txt | |
| REM type software_list.txt | more | |
| echo. |
// Questa è una pagina web codificata in base64:
data:text/html;base64,PGh0bWw+DQo8aGVhZD4NCjx0aXRsZT4NClBoaXNoaW5nDQo8L3RpdGxlPg0KPC9oZWFkPg0KPGJvZHk+DQo8aDE+SGVsbG8gd29ybGQhPC9oMT4NCjxhIGhyZWY9ImRhdGE6dGV4dC9odG1sO2Jhc2U2NCxQR2gwYld3K0RRbzhhR1ZoWkQ0TkNqeDBhWFJzWlQ0TkNsQm9hWE5vYVc1bkRRbzhMM1JwZEd4bFBnMEtQQzlvWldGa1BnMEtQR0p2WkhrK0RRbzhhREUrU0dWc2JHOGdkMjl5YkdRaFBDOW9NVDROQ2p4aElHaHlaV1k5SW1acGJHVTZMeTh2UkRvdlEwbEJUMzR4TGtoVVRTSWdkR0Z5WjJWMFBTSmZZbXhoYm1zaVBreHBibXNnZEc4Z2RHaHBjeUJ3WVdkbFBDOWhQZzBLUEM5aWIyUjVQZzBLUEM5b2RHMXNQZz09IiB0YXJnZXQ9Il9ibGFuayI+TGluayB0byB0aGlzIHBhZ2U8L2E+DQo8L2JvZHk+DQo8L2h0bWw+
| # download images from last.fm | |
| # PyQuery is a very powerful module to parse HTML pages, but it is not by default distributed with Python | |
| # if you want install it you need first install lxml module | |
| # Same features of this script works only with pyquery, but the most important ones (download images of cover and artist) works without installing it | |
| try: | |
| from pyquery import PyQuery as pq | |
| pyquery = True | |
| except ImportError: |
| @echo off | |
| if "%2"=="" (set lines=3) else (set lines=%2) | |
| set /a lines=%lines% + 1 | |
| set sed="$q;N;%lines%,$D;ba" | |
| sed -e :a -e %sed% %1 |
| @echo off | |
| set tempfile="%~dp0\temp.txt" | |
| set mimetypes=%~dp0mimetypes.txt | |
| REM Extracting the extension of the file | |
| set ext=%~x1_ | |
| REM Removing the period for using as correct variable name | |
| set ext=%ext:~1,-1% | |
| REM Load mimetypes from file, if some mimetype is missing update the file mimetypes.txt | |
| REM for any mimetypes is created a variable mime_mimetype, for example mime_png for image/png | |
| for /f "delims== tokens=1,2 eol=#" %%i in (%mimetypes%) do set mime_%%i=%%j |