Skip to content

Instantly share code, notes, and snippets.

View chriskiehl's full-sized avatar

Chris chriskiehl

View GitHub Profile
@chriskiehl
chriskiehl / Vitual keystroke example
Created June 10, 2012 15:08
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,
import time
import win32api, win32con
VK_CODE = {'left_arrow':0x25,
'spacebar':0x20,
'right_arrow':0x27}
def press(x):
win32api.keybd_event(VK_CODE[x], 0,0,0)
win32api.keybd_event(VK_CODE[x],0 ,win32con.KEYEVENTF_KEYUP ,0)
"""
Getting rid of some garbage on the internet.
"""
import time
import twitter
api = twitter.Api(consumer_key='',
consumer_secret='',
access_token_key='',
@chriskiehl
chriskiehl / letsencrypt_2017.md
Created June 17, 2017 22:32 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

'''
gooeyCheckboxesProblem.py
@summary Some checkboxes do not react to user input at all.
@author https://github.com/drandreaskrueger
@bitcoin 1GdYteTSMUgiKdm1M4Yim7YdLoAoeME8kj
@since Created on 28 Jan 2016
@abstract This shows the combinations that are ill:
Run 1: Just press Start.
Run 2: Switch ALL checkboxes to opposite values.
Output: