Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@jasondavis
jasondavis / titleUrlMarkdownClip.js
Created August 12, 2021 21:18 — forked from idelem/titleUrlMarkdownClip.js
Bookmarklet to copy current page title and url in Markdown format to clipboard, like [title](url) - Usual for posting links to resources in README.md files
javascript:(function() {
function copyToClipboard(text) {
if (window.clipboardData && window.clipboardData.setData) {
/*IE specific code path to prevent textarea being shown while dialog is visible.*/
return clipboardData.setData("Text", text);
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) {
var textarea = document.createElement("textarea");
textarea.textContent = text;
@jasondavis
jasondavis / [square tag].ahk
Created August 28, 2020 03:25 — forked from db93n2/[square tag].ahk
🏷️ (autohotkey) - add a tagspaces style [tag] to a filename
/*
[tag list]
bank
car
insurance
receipt
tax
[settings]
recent_total = 11
@jasondavis
jasondavis / text launcher.ahk
Created August 28, 2020 03:18 — forked from db93n2/text launcher.ahk
(autohotkey) - launch files/folders/urls from a text list
#noEnv
#singleInstance, force
sendMode, input
return
!l:: goSub, get_text_to_launch
!+l::goSub, text_launcher ; repeat last selection
@jasondavis
jasondavis / vhosts.bat
Created August 21, 2020 20:54 — forked from ukazap/vhosts.bat
Windows batch script for creating new virtual host entries on Apache.
@echo off
set texteditor=subl rem Text editor of your choice e.g. Sublime Text (subl)
set hostsfile=C:/Windows/System32/drivers/etc/hosts rem Where Windows' hosts file is located
set vhostsfile=C:/wamp/bin/apache/apache2.4.9/conf/extra/httpd-vhosts.conf rem This one depends on your installation.
set htdocs=C:/wamp/www rem This one depends on your installation.
if ["%1"] == ["edit"] goto:edit
if ["%1"] == ["add"] goto:add
goto:usage
; Works for DropDownList/ComboBox/ListBox
Class ListBox
{
__New(hwnd) {
; GuiControl, +AltSubmit, %hwnd%
this.hwnd := hwnd
}
Add(str) {
GuiControl,, % this.hwnd, %str%
@jasondavis
jasondavis / openSublimeProject.ahk
Created April 16, 2018 23:20 — forked from noahcoad/openSublimeProject.ahk
Fixes Sublime Text 2 open project odd behavior on Windows by making sure the selected project receives focus. Will also open files in a specific project window.
;
; Opens Sublime Text 2 and makes the wanted project have focus
; If additional files are specified, they'll be opened in the specified project
; Useful for scripting, global hotkeys, command launchers, etc
;
; Example:
; openSublimeProject.ahk c:\sites\blog\blog.sublime-project c:\sites\blog\.gitignore c:\sites\blog\Gemfile
;
; Problems this script fixes:
; 1. If sublime is already open with the requested project, it creates an empty window and makes that active
@jasondavis
jasondavis / Sidebar for notes in autohotkey
Created March 3, 2018 07:51 — forked from CCCBBBAAAHIGHSCORE/Sidebar for notes in autohotkey
Sidebar for notes in autohotkey (work in progress)
gui_state = closed
Return ; end of autoexecute
ScrollLock::
if gui_state != closed
{
; If the GUI is already open, close it.
gui, Destroy
@jasondavis
jasondavis / onTop.ahk
Created February 26, 2018 17:37 — forked from db93n2/onTop.ahk
🎩 (autohotkey) - manage 'always on top' windows from a context menu
#noEnv
#singleInstance, force
return ; end of auto-execute
#space::goSub, onTop_menu ; show menu
#!space::goSub, toggle_onTop ; toggle the active window
^#!space::goSub, minimise_all_onTop
; Pulover's Clipboard History
#NoEnv
#SingleInstance force
#InstallKeybdHook
Menu, Tray, Add, Show Clipboard History, ShowHistory
Menu, Tray, Add, Options, Options
Menu, Tray, Add, Pause, PauseScript
Menu, Tray, Add, Exit, Exit
/* _______________________________________________________________________________________
_____ ______ __ _
|_ _| | ____| /_ || | _ _ _ SKAN (Suresh Kumar A N)
| | ___ ___ _ __ | |__ __ __ | || |_| | | | | | [email protected]
| | / __/ _ \| '_ \| __| \ \/ / | ||___| | | ' | |
_| || (_| (_) | | | | |____ > < | | | | | |__| | Created on : 13-May-2008
|_____\___\___/|_| |_|______/_/\_\ |_|(_) |_| \.___/ Last Modified : 10-Aug-2012
[ I C O N E X P L O R E R A N D E X T R A C T O R ] Version : 1.4u
_______________________________________________________________________________________