This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Bilibili Screenshots Syncer | |
It can download `/Pictures/bili/screenshot` from a Android phone via ftp. | |
It also rename the picture so the timestamp comes first. | |
""" | |
from __future__ import print_function | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var text = window.prompt('Enter the message to push, or leave empty and push the current url.'); | |
if (text=="") { | |
text=window.location.href | |
} | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', 'https://api.pushover.net/1/messages.json'); | |
xhr.setRequestHeader('Content-Type', 'application/json'); | |
xhr.send(JSON.stringify({ | |
token: 'APP_TOKEN', | |
user: 'USER_KEY', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import absolute_import | |
import argparse | |
import os | |
import subprocess | |
def normalize(line): | |
line = line.strip('\n') | |
if line.startswith('#') or line.startswith('-'): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lastpass2keepass | |
# Supports: | |
# Keepass XML - keepassxml | |
# USAGE: python lastpass2keepass.py exportedTextFile | |
# The LastPass Export format; | |
# url,username,password,1extra,name,grouping(\ delimited),last_touch,launch_count,fav | |
import sys, csv, time, datetime, itertools, re, operator # Toolkit | |
import xml.etree.ElementTree as ET # Saves data, easier to type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import glob | |
import os | |
import urllib | |
def confirm(text): | |
answer = raw_input(text) | |
answer = answer.lower() | |
return answer == 'y' or answer == 'yes' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote -v | head -1 |awk '{ print $2 }' | sed 's/https:\/\//git remote set-url origin git@/g' | sed 's/.com\//.com:/g' |
OlderNewer