Skip to content

Instantly share code, notes, and snippets.

@AndrewBarfield
AndrewBarfield / gist:2552137
Created April 29, 2012 17:31
PowerShell: Display file descriptions of all executables in the System32 folder
cls
# Change the current directory to the System folder
cd C:\Windows\System32\
# Display all executable files along with their file description
get-childitem * -include *.exe | foreach-object {
"{0}, {1}" -f $_.Name,
[System.Diagnostics.FileVersionInfo]::GetVersionInfo($_).FileDescription }
@steelcm
steelcm / gist:2558512
Created April 30, 2012 13:50
Find open ports on windows server using PowerShell
PS C:\> netstat -an | select-string -pattern "listening"
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:81 0.0.0.0:0 LISTENING
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:383 0.0.0.0:0 LISTENING
@Uberi
Uberi / Decompiler.ahk
Last active March 2, 2025 02:52
AHK script decompiler with GUI. Based on IsNull's [decompiler](http://www.autohotkey.com/board/topic/82986-ahk-l-decompiler-payload-method/).
#NoEnv
SetBatchLines, -1
Gui, Font, s16, Arial
Gui, Add, Edit, x10 y10 w450 h30 vPath gUpdate
Gui, Add, Button, x460 y10 w30 h30 gSelectFile, ...
Gui, Font, s12, Courier New
Gui, Add, Edit, x10 y50 w480 h340 vCode ReadOnly -Wrap, <Output>
Gui, Show, w496 h398, AutoHotkey Decompiler
@dcunited001
dcunited001 / .Xmodmap
Created December 2, 2012 12:48
Configure Hyper Key in Linux with Xmodmap
! This sets Caps to Escape
! Then sets Escape to Hyper
! save this file to: /etc/X11/xinit/Xmodmaprc
! then call in: /etc/X11/xinit/xinitrc
! with: xmodmap /etc/X11/xinit/Xmodmaprc
! ASUS UL50V
clear Lock
@roryokane
roryokane / FixCtrlBackspace.ahk
Created August 26, 2013 21:19
AutoHotkey script to fix Ctrl+Backspace (delete previous word) in File Explorer and Notepad
; how to write scripts: http://www.autohotkey.com/docs/
#IfWinActive ahk_class CabinetWClass ; File Explorer
^Backspace::
#IfWinActive ahk_class Notepad
^Backspace::
Send ^+{Left}{Backspace}
#IfWinActive
; source and context: http://superuser.com/a/636973/124606
@zemax
zemax / WindowsMove.ahk
Last active July 2, 2024 17:48
An AutoHotKey script to move & resize windows screen when pressing Win + Alt + Left or Win + Alt + Right. Window moves from 33% Left > 50% Left > 66% Left > 66% Right > 50% Right > 33% Right
;********************************************************************************
; Move Windows by 1/3
;********************************************************************************
MoveCycle(Add) {
static SizeCycle = 0
SizeCycle := Mod(SizeCycle + Add, 6)
if (SizeCycle < 0) {
SizeCycle := SizeCycle + 6
}
@nikoheikkila
nikoheikkila / twitch_check.php
Last active December 4, 2020 07:17
PHP: Check from Twitch.tv APIv3 if channel is live
<?php
/**
* Use Twitch.tv API v3 to check if the specified channel has stream going on
*
* @author Niko Heikkilä, 2014
* @param STRING $channel Representing the channel/account name
* @return BOOL TRUE if online, FALSE if offline
*/
@caseywatts
caseywatts / bookmarkleting.md
Last active April 12, 2025 09:23
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

mpv link_to_youtube_vid --no-video
@db93n2
db93n2 / my gists - autohotkey.md
Last active July 15, 2024 22:17
my autohotkey gists