Skip to content

Instantly share code, notes, and snippets.

@stephancill
stephancill / .gitignore
Created March 10, 2016 08:23 — forked from adamgit/.gitignore
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
#!/Users/stephan/anaconda/bin/python
# -*- coding: utf-8 -*-
# <bitbar.title>Calendar Tracker</bitbar.title>
# <bitbar.version>0.1</bitbar.version>
# <bitbar.author>Stephan Cilliers</bitbar.author>
# <bitbar.author.github>stephancill</bitbar.author.github>
# <bitbar.desc>Easily keep track of upcoming events.</bitbar.desc>
from __future__ import print_function
@stephancill
stephancill / olympiad.py
Last active October 15, 2016 09:28
Set up directory and touch files for Olympiad questions.
"""
Setup:
alias olympiad="python3 [path/to/olympiad.py]" (in ~/.bashrc)
"""
import argparse
import sys
import os
parser = argparse.ArgumentParser(description='Set up a working directory for typical olympiad questions.')
parser.add_argument('name', metavar='NAME', type=str,
/* m is for material */
/*
USAGE:
<div class="m-group">
<input class="m-input" type="email" required>
<span class="m-bar"></span>
<span class="m-bar-default"></span>
<label class="m-label">Email</label>
</div>
*/
/* m is for material */
/*
USAGE:
<div class="m-group">
<input class="m-input" type="text" required>
<span class="m-bar"></span>
<span class="m-bar-default"></span>
<label class="m-label">Email</label>
</div>
*/
import time
import pyHook
import pythoncom
import sys
from PIL import Image, ImageGrab
from pymouse import PyMouse
import logging
def getResolution():
"""Returns resolution of screen."""
@stephancill
stephancill / https.js
Last active February 10, 2017 05:41
Make new bookmark using the contained script as the url.
javascript:(function(){ var curloc = window.location.toString(); var newloc = "https:" + curloc.substring(curloc.indexOf("//"), curloc.length); location.href=newloc; })()
@stephancill
stephancill / website-monitor.py
Created July 24, 2017 09:34
Naively monitor a list of urls and send a notification once the response changes.
#!/usr/bin/env python
# Usage: ./website-mon.py x.com
import urllib.request
import time
import sys
import smtplib
# Source: https://stackoverflow.com/questions/10147455/how-to-send-an-email-with-gmail-as-provider-using-python#12424439
//
// TimedActionRepeater.swift
//
// Created by Stephan Cilliers on 2018/06/26.
// Copyright © 2018 Stephan Cilliers. All rights reserved.
//
import Foundation
class TimedActionRepeater {
@stephancill
stephancill / Pipfile
Created January 20, 2023 15:23
SD Wrapper
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
replicate = "*"
flask = "*"
[dev-packages]