Skip to content

Instantly share code, notes, and snippets.

View kleerkoat's full-sized avatar

kleerkoat kleerkoat

View GitHub Profile
t = '''Inbox:
Project 01:
- Task 01
this is a comment
this is still a comment associate with task 01
- sub 01
- sub 02
- sub 05
- Task 02
@omz
omz / SlimIt-Installer.py
Created October 21, 2013 17:11
SlimIt-Installer
ply_url = 'https://pypi.python.org/packages/source/p/ply/ply-3.4.tar.gz'
slimit_url = 'https://pypi.python.org/packages/source/s/slimit/slimit-0.8.1.zip'
print 'Downloading SlimIt...'
from urllib import urlretrieve
import tarfile
import zipfile
import shutil
import os
try:
@Moving-Electrons
Moving-Electrons / EN_Meeting_Template.py
Last active September 15, 2017 08:04
Evernote Template Note - Pythonista
# This script uses Evernote's API to create a new template note to be used in meetings.
# The template includes the following fields: Date, Time, Attendance, Objective, Remarks and
# Action Items. The fields are shown using Evernote Markup Language. It also automatically
# adds the the date when the note was created at the end of the note's title.
#
# When run, it lists all notebooks in a user's account (just as reference), then
# asks for the title of the new note (automatically adding the current date at the
# end in ISO format YYYY-MM-DD), then asks for the tags to be assigned to the note and
# creates it in a pre-defined notebook (hard coded in the ntbkName variable below).
#
@epramono
epramono / Share...
Created September 23, 2013 15:32
This action allows you to share the first three lines of your draft to any number of built-in actions in Drafts. This approach also supports Email actions, Message actions, Dropbox actions, and Evernote actions that you may have created. It also works with custom URL actions that **do not have** an `x-success` parameter attached to it. This appr…
drafts://x-callback-url/create?
text=[[line|..3]]&
action=[[line|4]]&
x-success=
{{drafts://x-callback-url/create?
text=[[line|..3]]%0A[[line|5..]]&
action=Share...&
afterSuccess=Delete}}&
afterSuccess=Delete
@cclauss
cclauss / textFullScreen.py
Last active December 23, 2015 13:29
Display the clipboard text at full screen resolution... Show a message to your friends... Show the taxi driver your desired address... Have fun.
# Display the current clipboard text in full screen mode
import clipboard, console, scene
clipText = clipboard.get()
if not clipText:
clipText = """Hang up your cellphone and drive your car!!!"""
zclipText = """Please take me home..."""
class MyScene(scene.Scene):
def setup(self):
(imageName, imageSize) = self.getImageNameAndSize()
@Anton-2
Anton-2 / get_location.py
Created September 16, 2013 22:19
get_location
import socket
import webbrowser
import re
html = """
<!DOCTYPE html>
<html>
<head>
<script>
@cclauss
cclauss / noDoze.py
Last active January 20, 2023 07:08
Update: This looks like a far better solution... `console.set_idle_timer_disabled(flag)` Disable or enable the idle timer (which puts the device to sleep after a certain period of inactivity). -- Keep relaunching yourself to prevent your iOS device from falling asleep. Run, sleep 30 seconds, store state in argv (or a file), reboot self -- Repeat…
# Update: This looks like a far better solution...
# `console.set_idle_timer_disabled(flag)`
# Disable or enable the idle timer (which puts the device to sleep after a certain period of inactivity).
# noDoze.py -- keep relaunching yourself to prevent
# your iOS device from falling asleep.
import notification, time, urllib
def argsString(argv):
@ttscoff
ttscoff / aliaslast.bash
Last active February 20, 2025 09:52
Alias last command in bash and save
# alias last and save
# use `als c NAME` to chop off the last argument (for filenames/patterns)
als() {
local aliasfile chop x
[[ $# == 0 ]] && echo "Name your alias" && return
if [[ $1 == "c" ]]; then
chop=true
shift
fi
aliasfile=~/.bash_it/aliases/custom.aliases.bash
@cclauss
cclauss / tiltingColor.py
Last active December 21, 2015 18:48
A gravity hack that uses Pythonista's scene.gravity() method to change screen colors when the user tilts their device. Red = abs(pitch), Green = abs(yaw), Blue = abs(roll)
Moved to: https://github.com/cclauss/Pythonista_scene
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):