Skip to content

Instantly share code, notes, and snippets.

@JamoCA
JamoCA / CleanCSS.ahk
Created July 26, 2013 15:31
AutoHotKey script to minimizes spacing in CSS and convert common color codes to shorter values. (CTRL+ALT+S)
^!s:: ; CTRL+ALT+S Clean CSS (reduce whitespace + shorten hex color values)
WinGetActiveTitle, Title
IfInString, Title, HomeSite
{
StringReplace,clipboard,clipboard,;`r`n,;%A_Space%,,All
StringReplace,clipboard,clipboard,%A_Space%},},,All
StringReplace,clipboard,clipboard,{`r`n,{,,All
StringReplace,clipboard,clipboard,`r`n{,%A_Space%{,,All
StringReplace,clipboard,clipboard,{%A_Space%,{,,All
StringReplace,clipboard,clipboard,:%A_Space%,:,,All
@JamoCA
JamoCA / ColumnToSQLList.ahk
Created July 26, 2013 15:30
AutoHotKey script to convert clipboard columnar data (from Excel or text file) to SQL-compatible comma-delimited list (adds single quotes if data consists of non-numeric values) (Windows+C)
#c:: ;Window+C Convert Columnar Data to SQL-Compatible List
StringReplace,clipboard,clipboard,`n,`,,All
StringReplace,clipboard,clipboard,`r,,All
StringGetPos, pos, clipboard, ID`, ; remove "ID" if first item in the list (Access).
if pos = 0
StringRight, clipboard, clipboard, StrLen(clipboard)-3
testString = %clipboard%
StringReplace,testString,testString,`,,,All
testString := testString * 1
if (testString is integer) {
@JamoCA
JamoCA / StripFormatting.ahk
Last active June 10, 2025 16:40
AutoHotKey script to remove hidden Microsoft mark-up from the clipboard when pasting from Word to online WYSIWYG editors, cleaning up Outlook replies, removing trailing non-breaking spaces or using the "Paste as Value" function in Excel. (Windows+V)
REMOVECHAR:
AutoTrim,Off
StringCaseSense,On
StringReplace,string,string,chr(160),A_Space,All ;Non-breaking space
StringReplace,string,string,–,-,All ;emdash
StringReplace,string,string,—,-,All ;endash
StringReplace,string,string,´,',All
StringReplace,string,string,‘,',All
StringReplace,string,string,é,e,All
StringReplace,string,string,’,',All
@kmark
kmark / plexDownload.php
Last active May 17, 2024 02:08
The Plex Universal Transcoder Downloader mimics the actions of the Plex/Web media flash player to download transcoded media. The differences begin when the downloader saves the streamed data and pieces it together. First a start.m3u8 playlist file is requested from the server with a query string that defines the transcoding options. Inside the …
<?php
/*******************************************************************************
* Plex Universal Transcoder Downloader v1.3 *
* See --help or --usage for more info *
*******************************************************************************
* Copyright 2013 Kevin Mark *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
@dlo
dlo / export_pinboard.py
Last active April 24, 2025 10:08
Export all Pinboard.in bookmarks with a specific tag.
#!/usr/bin/env python
"""
This script is designed to generate a simple HTML file with _all_ of your
Pinboard.in bookmarks.
You should edit the `username`, `password`, `bookmark_filename`, and `tag`
variables.
Requirements:
@atenni
atenni / README.md
Last active December 24, 2025 04:19
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]

@aviaryan
aviaryan / Everything.ahk
Last active October 12, 2025 00:10
Everything Integration with AutoHotkey - Faster Search in Windows
EverythingPath = ;specify the path here
#IfWinActive ahk_class CabinetWClass
{
F6::
folder := GetFolder()
run, %EverythingPath% -path "%folder%"
return
}
@brendannee
brendannee / gist:5400591
Last active April 21, 2022 08:56
Restart chromium via SSH
# stop chromium
sudo killall chromium
# manually set the display to one that is currently being used
# start chromium in kiosk mode with the URL we want to load
# use nohup so it stays up after we disconnect
DISPLAY=:0 nohup chromium --kiosk --incognito bart.blinktag.com/?station=16TH &
@vitorgalvao
vitorgalvao / Get Title and URL.applescript
Last active November 7, 2025 10:08
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Webkit variants include "Safari", "Webkit", "Orion".
-- Specific editions are valid, including "Safari Technology Preview".
-- "Safari" Example:
tell application "Safari" to return name of front document
@alexandernst
alexandernst / cross-compiling-hello-world
Last active December 30, 2016 06:04
Cross-compiling applications for ARM
$ pwd
/home/alexandernst/tmp_arm_build
$ cat hello_world.c
#include <stdio.h>
int main(int argc, char **argv){
printf("Hello world!\n");
return 0;
}
$ gcc -o hello_world hello_world.c