Skip to content

Instantly share code, notes, and snippets.

@satyr
satyr / copy.ubiq.js
Last active October 6, 2016 04:09
Builds a text (from the page title etc.) and sends it to your clipboard.
const
H = Utils.escapeHtml,
Aliases = {
t: {
help: 'title',
get text(){ return info().title },
},
u: {
help: 'URL',
get text(){ return info().url },
@alexpos
alexpos / brettquix.txt
Created October 22, 2012 13:47 — forked from ttscoff/brettquix.txt
Brett's Quix File
@Brett's searches
@Brett's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
b https://duckduckgo.com/?q=%21%s Bang search (DuckDuckGo)
grep https://www.cueup.com/?q=%s&fq=1 Greplin
ss https://duckduckgo.com/site:%d%20%s Current site (DuckDuckGo)
bt https://duckduckgo.com/site:brettterpstra.com%20%s BrettTerpstra.com (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
hints http://hints.macworld.com/search.php?query=%s&keyType=all&datestart=&dateend=&topic=0&type=stories&results=50&mode=search Search Mac OS X Hints
mu http://www.macupdate.com/find/mac/%s Search MacUpdate (Software)
@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
@vitorgalvao
vitorgalvao / Get Title and URL.applescript
Last active May 22, 2024 11:01
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
@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 &
@aviaryan
aviaryan / Everything.ahk
Last active June 8, 2023 23:48
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
}
@atenni
atenni / README.md
Last active April 24, 2024 01:36
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]

@dlo
dlo / export_pinboard.py
Last active February 1, 2023 21:46
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:
@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 *
@JamoCA
JamoCA / StripFormatting.ahk
Last active December 20, 2015 06:58
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
StringReplace,string,string,’,',All
StringReplace,string,string,©,(C),All
StringReplace,string,string,“,",All ;left quote
StringReplace,string,string,”,",All ;right quote