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
REM placer ce fichier à l'emplacement suivant | |
REM Windows 8 | |
REM C:\Users\nom d’utilisateur\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup | |
REM Windows 7/vista | |
REM C:\Utilisateurs\nom d’utilisateur\AppData\Roaming\Microsoft\Windows\Menu Démarrer\Programmes\Démarrage | |
ECHO | DEL /F /S /Q /A C:\Windows\TEMP\*.* | |
ECHO | DEL /F /S /Q /A "C:\Users\%username%\Appdata\Local\Temp\*-*" |
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
(function( window ) { | |
var document = window.document, | |
fieldValueMap = { | |
'addressName' : 'Mon Adresse' | |
//, 'owner_counrty' : 'France' | |
, 'city' : 'Lille' | |
, 'postalCode' : '59000' | |
, 'addressLine4' : 'Bâtiment ou étage' | |
, 'owner_further_address_details' : 'Compl. Adresse' // id | |
//, 'owner_further_moving_date_month' : '01' |
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
// from http://www.cristinawithout.com/content/function-trigger-events-javascript | |
//It takes 2 parameters: | |
//obj - the object to trigger the event on | |
// evt - the name of the event to trigger (as a string) | |
function fireEvent(obj, evt){ | |
var fireOnThis = obj; | |
if( document.createEvent ) { | |
var evObj = document.createEvent('MouseEvents'); |
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
eventvwr REM windows event viewer | |
tasklist /fi "imagename eq cntlm.exe" REM parmi les tâches trouver la tach cntlm.exe | |
netstat -a-n-o | find "3128" REM trouver tout ce qui ecoute sur le port 3128 | |
REM les deux commandes ci dessous sont executée en boite DOS d'ou le non doublement du % devant P (%%P dans un .bat) | |
REM trouver tous les processus qui ecoute sur le port 80 et renvoyer leur nom dans le gestionnaire des tâches | |
FOR /F "tokens=5 delims= " %P IN ('netstat -a -n -o ^| findstr :80') DO tasklist /fi "pid eq %P" | |
REM Mettre TaskKill.exe /PID %P permettrait de tuer la tâche | |
REM to get the PID plus a list of all services hosted by the process of PID 4 | |
tasklist /svc /fi "PID eq 4" /fo list |
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
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst | |
Install-WindowsUpdate -acceptEula | |
cinst Python | |
Install-WindowsUpdate -acceptEula |
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
http://www.mrexcel.com/forum/excel-questions/71978-convert-column-number-letter.html | |
SUBSTITUE(ADRESSE(1;COLONNE();4);"1";"") |
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
http://sql.sh/55-requete-trouver-doublon | |
Doublons absolus | |
SELECT COUNT(*) AS nbr_doublon, champ1, champ2, champ3 | |
FROM table | |
GROUP BY champ1, champ2, champ3 | |
HAVING COUNT(*) > 1 | |
Doublons sur colonne email par exemple | |
SELECT COUNT(email) AS nbr_doublon, email |
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
// by using KingPin | |
sSep = app.Flag("separator", "Separator to use in csv file (in read and write) [default is ','].").Short('s').Default(",").String() | |
// Need to cast *sSep in rune for option Comma in "encoding/csv" | |
w.Comma = bytes.Runes([]byte(*sSep))[0] // fr => converti la chaine en tableau de bytes, pour apres la convertir en rune | |
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
:: cherche si la chaine compiled est présente dans le nom de fichier | |
ECHO "truc-compiled" | findstr /r /c:"compiled" > nul && SET ISFOUND=1 || SET ISFOUND=0 | |
:: Orgigin | |
:: http://stackoverflow.com/questions/8756804/check-a-string-for-a-substring-in-a-batch-file-windows | |
:: Author dbenham | |
:: This regular expression example will search $1 for "BEGIN" at start of string, | |
:: "MID" anywhere in middle, and "END" at end. The search is case sensitive by default. | |
set "search=^BEGIN.*MID.*END$" |
OlderNewer