Skip to content

Instantly share code, notes, and snippets.

@tg-z
tg-z / android-type.rb
Created October 24, 2020 03:47 — forked from Pistos/android-type.rb
Ruby REPL for typing text on Android via adb
require "readline"
def escaped(s)
s.gsub("'", "'\\\\''")
end
while s = Readline.readline("> ", true)
e = escaped(s)
puts `./android-type.sh '#{e}'`
end
@tg-z
tg-z / get_books_on_shelf.py
Created October 15, 2020 05:57 — forked from steve-kertes/get_books_on_shelf.py
A Python example of how to use OAuth on GoodReads. Includes scripts to pull list of books that are on a shelf and to add all owned books to a shelf.
from string import Template
import oauth2 as oauth
import urlparse
import urllib
import time
import xml.dom.minidom
import sys, getopt
# If you get 'Title Messed Up By Unicode Error' messages try
# export PYTHONIOENCODING=utf-8
/*
//--> Repository for this Bookmarklet App: https://www.npmjs.com/package/ea-bookmarklets
Add https://ctrld.herokuapp.com/#%s to chrome://settings/searchEngines or as a bookmark
with a <keyword> in firefox - to load a gist into the editor by typing <keyword> <gisturl>
into the browsers locationbar. .. have fun.
*/
(async(window,document) => {
// https://gist.github.com/hagb4rd/6843803a6674fe1b9ead6f1e60f14f15#file-queue-download-images-js
// -----------
@tg-z
tg-z / zshrc
Last active December 1, 2019 13:55 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history