Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@jasondavis
jasondavis / index.html
Created October 24, 2021 22:02 — forked from felixrieseberg/index.html
Electron Fiddle Gist
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World!</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
<script>
// You can also require other files to run in this process
@jasondavis
jasondavis / md-calc.js
Created September 1, 2021 04:18
Notable md-calc custom js
/*
Description: This function will evaluate and update markdown tables similar to excel
Just Copy and paste this gist into Notable's Custom JS Editor
Requirements: v1.9.0-alpha.6 or newer (older versions don't have the Custom JS Editor)
Table Example:
|Home Evaluation 2020||
| ----------------- | -------: |
| Tax Land Value | [C]=14726 |
@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