Skip to content

Instantly share code, notes, and snippets.

View kleerkoat's full-sized avatar

kleerkoat kleerkoat

View GitHub Profile
@ChewingPencils
ChewingPencils / gist:2777049
Created May 23, 2012 18:52
External Drafts Bookmarklet js file.
/*
Drafts App Bookmarklets (http://agiletortoise.com/drafts)
Author: Sean Korzdorfer
Date: 13:51:29 Wed May 23 2012
Re: https://gist.github.com/gists/2579288
Most of the Date functions used snippets I created from:
http://www.webdevelopersnotes.com/tips/html/10_ways_to_format_time_and_date_using_javascript.php3
*/
@ttscoff
ttscoff / searchFocus.bookmarklet.js
Created July 3, 2012 01:05
Bookmarklet to select the search field on the current page and focus it
javascript:var%20inputs=document.getElementsByTagName('input'),firstSearch=false,textinputs=[],i,t;for(i=0;i<inputs.length;i++)if(((inputs[i].type==='text')||(inputs[i].type==='search'))&&inputs.disabled!==true)textinputs.push(inputs[i]);for(t=0;t<textinputs.length;t++)if((/search/i).test(textinputs[t].className)||(/(^[sq]$|search|query)/i).test(textinputs[t].id)||(/^(q(uery)?|s|.*?search.*)$/).test(textinputs[t].name)){firstSearch=textinputs[t];break;}if(!firstSearch)textinputs[0].focus();else%20firstSearch.focus();
@ttscoff
ttscoff / editscript.rb
Created July 7, 2012 01:26
Fuzzy CLI file search through configured directories, ranked results displayed as menu
#!/usr/bin/env ruby
# encoding: utf-8
# == Synopsis
# Proof of concept using Fuzzy File Finder to locate a script to edit
# Searches a set of predefined locations for a fuzzy string
# e.g. "mwp" matches both "myweatherprogram" and "mowthelawnplease"
# ................on "(m)y(w)eather(p)rogram" and "(m)o(w)thelawn(p)lease"
#
# Results are ranked and a menu is displayed with the most likely
# match at the top. Editor to be launched and directories to search
@Angles
Angles / some iOS browser URI launching JS snippets.js
Last active August 2, 2024 07:38
"Open In" Bookmarklets for iOS
/* WITH MODS TO ORIG -- iOS Browser Bookmarklets to launch other apps and stuff */
/* ver 2014-04-14a */
/* backing up my "Open In" bookmarks */
// note iOS6 requires some changes to these
// BEGIN TESTING STUFF -- IN PROFRESS LIKELY NOT WORKING
// SOME WORK, MOST tests are not WORK --
// PINNER APP TEST STUFF (as a private one)
// the page title as the title and your selected text as the description.
@gillibrand
gillibrand / air_hockey.py
Created August 6, 2012 05:38
An Air Hockey game for Pythonista on iPad and iPhone. Yes, I typed this all on my iPad. A little painful.
# Hockey
#
# A air hockey game for two players. First to
# seven wins.
# Most of the game is drawn with the scene
# module. Goal and winner messages are animated
# with layers.
from scene import *
from sound import *
@halr9000
halr9000 / Send-Pushover.ps1
Created August 8, 2012 19:45
Sample to send message via Pushover from Windows PowerShell
# Using any version of PowerShell
$parameters = New-Object System.Collections.Specialized.NameValueCollection
$parameters.Add("token", "APP_TOKEN")
$parameters.Add("user", "USER_KEY")
$parameters.Add("message", "hello world")
$client = New-Object System.Net.WebClient
$client.UploadValues("https://api.pushover.net/1/messages.json", $parameters)
# Using PowerShell v3 only with new Invoke-RestMethod cmdlet
$uri = 'https://api.pushover.net/1/messages.json'
@amontalenti
amontalenti / newsblur_add.js
Created August 26, 2012 18:00
NewsBlur bookmarklet that adds domain of current article to NewsBlur
javascript:(function() { var u = location.href, a = document.createElement('a'); a.href = u; location.href = "http://www.newsblur.com/?url=" + encodeURIComponent(a.hostname); }())
@lynxerzhang
lynxerzhang / notepad's theme
Created August 28, 2012 02:36
notepad++'s theme collection
(some notepad++'s theme)
http://wiki.macromates.com/Themes/UserSubmittedThemes
(Textmate theme to Notepad++ (.tmTheme converted to .xml, go to [users]/AppData/Roaming/Notepad++, replace the stylers.xml with the xml file))
http://framework.lojcomm.com.br/tmTheme2nppStyler/
javascript:(function%20pushoverBookmarklet()%20%7B%20%20%20%20%20%20%20%20%20%20%20%20function%20pushoverNotification(token,%20user,%20title,%20message,%20url)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20params%20%3D%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20token:%20token%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20user:%20user%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20title:%20title%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20message:%20message%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20,%20url:%20url%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20var%20data%20%3D%20%221%3D1%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20for%20(var%20key%20in%20params)%20%7B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data%20%2B%3D%20%22%26%22%20%2B%20key%20%2B%20%22%3D%22%20%2B%20params%5Bkey%5D%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%2
@omz
omz / FileTransfer.py
Last active November 16, 2025 10:57
File Transfer script for Pythonista (iOS)
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.