Skip to content

Instantly share code, notes, and snippets.

@gialloporpora
gialloporpora / gist:4572776
Created January 19, 2013 13:49
This batch file saves the list of installed programs in a tXT file for printing.
@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.
@gialloporpora
gialloporpora / svn-sheatsheet.md
Last active December 22, 2015 05:29
SVN cheatsheet

SVN cheatsheet

Clonare da server remoto

svn checkout URL svn co URL

Aggiornare la copia locale

svn up
@gialloporpora
gialloporpora / key-view-watched-thread-with-unread.js
Created April 25, 2014 14:31
This code add an hotkey to switch from View Watched Thread with Unread and All Thread in Thunderbird using userChrome.js add-on.
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');
@gialloporpora
gialloporpora / exl.py
Created April 27, 2014 08:52
Extracts links from a json file
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):
@gialloporpora
gialloporpora / vigenere.js
Last active August 29, 2015 14:05
This code implement the Vigenere cypher to solve EFF Puzzle (2014).
/*
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:
@gialloporpora
gialloporpora / README.md
Created October 25, 2015 07:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet