Skip to content

Instantly share code, notes, and snippets.

View confluencepoint's full-sized avatar
:octocat:
Focusing

confluencepoint confluencepoint

:octocat:
Focusing
View GitHub Profile
// MailMate layout that shows mails with the same tag as the selected tag (based on Correspondence)
{
name = "Tags";
rootViewer =
{
viewerType = "MmSplitView";
orientation = "horizontal";
children =
(
{
@lsfalimis
lsfalimis / append-attachment-en.scpt
Last active March 11, 2024 03:05
Append timestamp and theFile with line break to TARGETNOTE working with Hazel
tell application "Evernote"
set _selectedNote to false
set _notes to get every note of every notebook where its title contains "TARGETNOTE"
repeat with _note in _notes
if length of _note is not 0 then
set _selectedNote to _note
end if
end repeat
tell item 1 of _selectedNote to append text return & return & date string of (current date) & time string of (current date) & return
tell item 1 of _selectedNote to append attachment theFile
@apuignav
apuignav / pyp_beta
Last active September 11, 2017 15:10
#!/usr/bin/env python
#version 2.13
#author [email protected]
#Copyright (c) 2011-2015 Toby Rosen
#Distributed under the New BSD License.
#All rights reserved.
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@cdiener
cdiener / asciinator.py
Last active January 5, 2023 17:24
Convert image to ascii art
import sys; from PIL import Image; import numpy as np
chars = np.asarray(list(' .,:;irsXA253hMHGS#9B&@'))
if len(sys.argv) != 4: print( 'Usage: ./asciinator.py image scale factor' ); sys.exit()
f, SC, GCF, WCF = sys.argv[1], float(sys.argv[2]), float(sys.argv[3]), 7/4
img = Image.open(f)
S = ( round(img.size[0]*SC*WCF), round(img.size[1]*SC) )
img = np.sum( np.asarray( img.resize(S) ), axis=2)
@hiilppp
hiilppp / random_reminders.py
Created April 2, 2014 15:03
Pythonista script that randomly selects a reminder (out of a given list) and schedules a (quiet) notification for that reminder at a random point of time in the future (within a given range). Opening the notification will then schedule a new reminder notification (and, if provided, follow a link).
import notification
from random import randint
import sys
import urllib
import webbrowser
reminders = ["Reminder A", ["Reminder B", "url://"], "Reminder C"]
n = randint(0, len(reminders)-1)
URL = "pythonista://random_reminders.py?action=run"
@omz
omz / FontInstaller.py
Last active January 31, 2025 20:34
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@dahanbn
dahanbn / tag_with_pushpin.js
Created March 29, 2014 14:08
Headless bookmarklet to launch Launchcenter Pro to choose various tag sets from a list and launch Pushpin with title, URL and the chosen tags. You can add frequently used tag combinations to that bookmarklet and add later a few single tags with the excellent tag completion feature of Pushpin. It is inspired by Federio Vitticci and his headless i…
javascript:
window.location = 'launchpro://?url=' + encodeURIComponent('launchpro://?url='+ encodeURIComponent('pushpin://add?url={{' + location.href + '}}&title={{' + document.title + '}}&tags=[list:📌'+ location.href +'|without tag= |!to_check_out|ios app url-scheme=ios app url-scheme|ebook=reading ebook]'));
@nealtz
nealtz / TNG_Redirect_Example.py
Last active August 29, 2015 13:57
Redirect Telefonnumbers via TNG.de
# -*- coding: utf-8 -*-
# Check and change redirection status of a telefon number via the
# website of my telephone network service provider TNG.de
# Python Script for iOS Pythonista App (Vers. 1.4)
from bs4 import BeautifulSoup
import requests, console, re, sys, time, exceptions
try:
@bbatsell
bbatsell / gist:9237707
Created February 26, 2014 20:22
Add website to file
javascript:(function(){window.location="launch://x-callback-url/dropbox/append?text="+encodeURIComponent(document.title+" - "+location.href)+"&path=%2FPublic&name=Websites.txt&linebreak=YES&x-success="+encodeURIComponent(location.href);})();
@hiilppp
hiilppp / urlschemes.sh
Created February 20, 2014 18:14
Shell script to list the URL schemes associated with apps installed on your Mac.
#!/bin/sh
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -dump | grep -E "^[[:space:]]*bindings:.+[a-z]+[a-z0-9.+-]*:" | sed -E "s/^[[:space:]]*bindings:[[:space:]]+//" | sort -u