I hereby claim:
- I am lanmaster53 on github.
- I am lanmaster53 (https://keybase.io/lanmaster53) on keybase.
- I have a public key whose fingerprint is B279 E8C6 4E81 365C D7B2 B26B B949 6C76 7931 0988
To claim this, I am signing this object:
#!/usr/bin/env python | |
import sys | |
import email | |
raw = open(sys.argv[1]).read() | |
msg = email.message_from_string(raw) | |
print 'Parsing message...' | |
for part in msg.walk(): | |
c_disp = part.get('Content-Disposition') |
I hereby claim:
To claim this, I am signing this object:
import argparse | |
import datetime | |
import urllib | |
import urllib2 | |
import json | |
import sys | |
_token = 'YOUR_SLACK_API_KEY' | |
_files_list_url = 'https://slack.com/api/files.list' | |
_files_delete_url = 'https://slack.com/api/files.delete' |
#!/usr/bin/env python | |
import argparse | |
import ctypes | |
import difflib | |
import itertools | |
import os | |
import sys | |
# ingore hidden directories |
def is_safe_url(url, origin): | |
# url: "next" parameter value | |
# origin: full request URL | |
host = urlparse(origin).netloc | |
proto = urlparse(origin).scheme | |
# reject blank urls | |
if not url: | |
return False | |
url = url.strip() | |
url = url.replace('\\', '/') |
# other stuff here | |
# derivative of https://github.com/lojikil/dotfiles/blob/master/.bashrc#L33 | |
# create virtualenv management functions | |
function venv-activate() { | |
# always activate a local venv if available | |
if [ -d "$(pwd)/venv" ] | |
then | |
echo "local virtualenv activated (venv)." | |
# ...but warn if a global venv by the given name exists |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Arrow</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.arrow-1 { | |
content: ""; |
// define global variables to pass data between textarea and select elements | |
var currentEl = null; | |
var currentTag = null; | |
// dynamically create a select box to populate with options | |
$("body").append($("<select></select>").attr("id", "template-select").attr("style", "position: absolute; display: none;")) | |
function getCaretPosition(el) { | |
var start, end; | |
if (el.setSelectionRange) { |
# Moved to https://github.com/lanmaster53/pyscripter-er/tree/master/snippets |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Autocomplete Password Test</title> | |
<script> | |
function toggleType() { | |
var el = document.getElementById("pw"); | |
if (el.type =="password") { | |
el.type = "text"; |