Skip to content

Instantly share code, notes, and snippets.

Henry Schreiner henryiii

Block or report user

Report or block henryiii

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
henryiii /
Created Jul 16, 2014
UI powered text manipulation
# perform actions on a selected block of text
import editor
import ui
sel = editor.get_selection()
text = editor.get_text()
if sel[0]-sel[1]:
text = text[sel[0]:sel[1]]
henryiii /
Last active Aug 29, 2015
Pythonista 2048 clone, using ui module. Also should work in any Python console. Added jsbain's swipe implementation.
# -*- coding: utf-8 -*-
Created on Sat Jul 12 09:33:29 2014
@author: henryiii
Added improvents by JonB (swipes), techteej (design), LawAbidingCactus (size)
import console, random
henryiii /
Last active Aug 29, 2015
directory viewer for ui
# coding: utf-8
import ui
import os
import console
class MyTableViewDataSource (object):
sel = [None]
def __init__(self, base_dir = '.'):
import ui
import console
#from DetGUI.connection import Detector
sz = ui.get_screen_size()
banner = 108
class MyTextFieldDelegate (object):
def __init__(self,but):
self.but = but
# Install SimPy
import urllib
import tarfile
import shutil
import console
import os
name = 'sympy'
version = '0.7.5'
View gist:6274508
#!\usr\bin\env python
from PyQt4 import QtCore, QtGui, uic
import sys
import os
Slot = QtCore.pyqtSlot
Signal = QtCore.pyqtSignal
LoadUI = uic.loadUi
if getattr(sys, 'frozen', None):
henryiii / git-all.bash
Last active Jul 18, 2019
Fast repository status for repos in git folder
View git-all.bash
#!/usr/bin/env bash
# This script should be named (or symbolically linked) as git-all so that
# it can be run as a git command (if it is in the path). The repo location should
# be set in REPOLOC. Can be relative if this script is also in a repo!
# Standard bash stuff to get the current directory
unset CDPATH
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
henryiii /
Created Jun 22, 2013
Python Script Template, copy useful parts.
#!/usr/bin/env python
import argparse
import os
DIR = os.path.realpath(__file__)
parser = argparse.ArgumentParser(description='Send files to web server')
parser.add_argument('-n', '--nochange',
help='make a dry run, don\'t send anything',
henryiii / bstemplate.bash
Last active Dec 18, 2015
Bash Script Template, copy useful parts.
View bstemplate.bash
#!/usr/bin/env bash
# No argument version (any argument prints help)
if [ $# -gt 0 ] ; then
echo "$(echo $0 | sed "s;$HOME;~;")"
echo "Help command output"
exit 0
You can’t perform that action at this time.