Skip to content

Instantly share code, notes, and snippets.

View StephaneTy-Pro's full-sized avatar

StephaneTy-Pro

  • France - Northern France - Lille/Tourcoing
View GitHub Profile
@StephaneTy-Pro
StephaneTy-Pro / default.css
Created February 4, 2016 09:16
treat external link with style
/*Identifier visuellement quand on change de site
le snippets suivant permet d'identifier les liens différemment visuellement
src : https://davidwalsh.name/external-links-css
*/
/* long version */
a[href^="http://"]:not([href*="mysite.com"]),
a[href^="https://"]:not([href*="mysite.com"]),
a[href^="//"]:not([href*="mysite.com"]), {
}
@StephaneTy-Pro
StephaneTy-Pro / FindLastLaunchedPID.cmd
Created March 31, 2016 11:36
Batch To See Which PID was launched
@echo off
set PROCESSNAME=notepad2.exe
::First save current pids with the wanted process name
setlocal EnableExtensions EnableDelayedExpansion
set "RETPIDS="
set "OLDPIDS=p"
for /f "TOKENS=1" %%a in ('wmic PROCESS where "Name='%PROCESSNAME%'" get ProcessId ^| findstr [0-9]') do (set "OLDPIDS=!OLDPIDS!%%ap")
SET OLDPIDS
@StephaneTy-Pro
StephaneTy-Pro / fileExists.go
Created April 27, 2016 07:50
Snippets for fileExists in Go
func fileExists(filename string) bool {
_, err := os.Stat(filename)
return err == nil
}
@StephaneTy-Pro
StephaneTy-Pro / [javascript] bookmarklet - the missing way to search only your own gists, including sorting by stars or forks.md
Created October 24, 2022 11:07
[javascript] bookmarklet - the missing way to search only your own gists, including sorting by stars or forks

TL;DR

  • base URL is: https://gist.github.com/search
  • use q=user:your_username+your_search_term
  • include s=stars and o=desc to sort by "most stars" (most stars on top, least stars at the end).
  • include s=stars and o=asc to sort by "least stars" (least stars on top, most stars at the end).
  • same goes for s=forks .
  • same goes for s=updated .
  • if you do not include s=, it will sort by "best match" .

2022-10-22_195313