Skip to content

Instantly share code, notes, and snippets.

View sgerin's full-sized avatar

Silouane Gerin sgerin

View GitHub Profile
@sgerin
sgerin / Markdown Image Link.py
Created July 15, 2013 10:04
Markdown Image Link
@sgerin
sgerin / Markdown Link.py
Created July 15, 2013 10:04
Markdown Link
@sgerin
sgerin / Password Setter.py
Created July 15, 2013 10:05
Password Setter
import keychain
import console
console.clear()
service = raw_input("Input service name: ")
username = raw_input("Input username: ")
password = raw_input("Input password: ")
keychain.set_password(service, username, password)
@sgerin
sgerin / Post to WordPress
Created July 25, 2013 12:15
Post to WordPress from Python.
import datetime
import xmlrpclib
import keychain
import clipboard
wp_url = "http://www.yoursite.com/xmlrpc.php"
wp_username = 'username'
wp_password = keychain.get_password('wordpress', wp_username)
wp_blogid = ""
@sgerin
sgerin / ios_icons
Created August 19, 2013 03:18
Get iOS icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script: http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Gets the 1024px version of an app icon and applies a rounded mask. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# You may find odd result: try searching for both device categories.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
@sgerin
sgerin / gist:6265532
Created August 19, 2013 03:25
Get OS X icons. Thanks to Brett Terpstra.
# Adapted from Brett Terpstra script : http://brettterpstra.com/2013/04/28/instantly-grab-a-high-res-icon-for-any-ios-app/
# Fetches the 1024px version of an OS X app icon. The result is displayed in Pythonista's console, you can tap and hold to save or copy it.
# If you find any bug, you can find me @silouane20 on Twitter.
from PIL import Image
from StringIO import StringIO
import re
import requests
def find_icon(terms):
@sgerin
sgerin / designer.html
Created April 13, 2015 13:41
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;