Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@kepano
kepano / obsidian-web-clipper.js
Last active May 2, 2024 13:07
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@msurguy
msurguy / List.md
Last active April 30, 2024 15:14
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@Skhmt
Skhmt / downloadbookmarklet.js
Last active April 29, 2024 21:17
Bookmarklet to download all images of a given class
javascript: (function () {
document.querySelectorAll('.BRpageimage').forEach(i => {
const url = new URL(i.src);
const filename = url.searchParams.get('file').split('/').pop().replace('.jp2','.jpg');
url.searchParams.set('scale', 1);
dl(url.href, filename);
});
function dl(url, filename) {
function blob2B64(blob, callback) {
#NoEnv
SetBatchLines, -1
#MaxHotkeysPerInterval 200
#Include <VA>
; Create the slider window
Gui, Add, Progress, w100 h20 x0 y0 Range0-100 vVolSlider, 0
Gui, Add, Text, w100 h20 x0 y0 vVolText BackgroundTrans Center +0x200, 0
Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Show, Hide w100 h20 x0 y0, Volume
@krrr
krrr / brightness.ahk
Last active April 26, 2024 15:51
Windows screen brightness fine tune (autohotkey)
#,::
AdjustScreenBrightness(-3)
Return
#.::
AdjustScreenBrightness(3)
Return
AdjustScreenBrightness(step) {
service := "winmgmts:{impersonationLevel=impersonate}!\\.\root\WMI"
@raveren
raveren / AIO.ahk
Last active April 26, 2024 12:29
My personal autohotkey configuration (used and updated for 10+ years!)
;
; ██╗███╗ ██╗██╗████████╗██╗ █████╗ ██╗ ██╗███████╗███████╗
; ██║████╗ ██║██║╚══██╔══╝██║██╔══██╗██║ ██║╚══███╔╝██╔════╝
; ██║██╔██╗ ██║██║ ██║ ██║███████║██║ ██║ ███╔╝ █████╗
; ██║██║╚██╗██║██║ ██║ ██║██╔══██║██║ ██║ ███╔╝ ██╔══╝
; ██║██║ ╚████║██║ ██║ ██║██║ ██║███████╗██║███████╗███████╗
; ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝
;
; https://gist.github.com/raveren/bac5196d2063665d2154/edit
;
@karpathy
karpathy / stablediffusionwalk.py
Last active April 25, 2024 11:25
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active April 20, 2024 01:53
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@iffy
iffy / .gitignore
Last active April 17, 2024 07:19
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot