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
;;; closure-gjslint.el --- Closure Lint mode | |
;; Copyright (C) 2011 Andi Albrecht | |
;; Author: Andi Albrecht <albrecht.andi@gmail.com> | |
;; Keywords: | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
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 python2 | |
# git-branch-io -- show incoming and outgoing commits | |
# | |
# Place this file somewhere in your PATH. | |
# | |
# Usage: git branch-io [branch] | |
# | |
# If branch is not given the current branch will be used. The script | |
# prints out how many commits should go in either direction to bring |
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
;;; python-flake8.el --- Thin wrapper around python-pylint to run flake8 | |
;; Copyright (C) 2011 Andi Albrecht | |
;; Author: Andi Albrecht <albrecht.andi@gmail.com> | |
;; Keywords: languages | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
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
try: | |
from collections import OrderedDict | |
except ImportError: | |
OrderedDict = None | |
from UserDict import UserDict | |
if OrderedDict is not None: | |
class Cache(OrderedDict): | |
def flush(self): |
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
#!/bin/bash | |
# A hacky command for a common task: | |
# - stash away all changes in working branch | |
# - update master from SVN | |
# - rebase working branch on master | |
# - flush all committed changes from working branch to master | |
# - push them to SVN | |
# - update working branch again | |
# - patch in changes |
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 python3 | |
# Usage: python3 tonart2spotify.py DATE | |
# ...where DATE is for example '2015-10-30' | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
import spotipy |
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
application: your-app-id | |
version: 1 | |
runtime: python27 | |
api_version: 1 | |
threadsafe: true | |
handlers: | |
- url: /.* | |
script: demo.application |
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 -*- | |
"""Set up an interactive interpreter to have a underlying tulip loop. | |
The setup() function replaces the default loop policy, that starts a loop only | |
for the main thread, by a policy that has a single global loop available in any | |
thread. | |
The loop will be started when calling setup() in a background thread so that | |
the main thread could still be used by the interactive shell. |
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 python3 | |
import json | |
import os | |
from urllib.request import urlopen | |
URL = 'http://api.openweathermap.org/data/2.5/weather?id=2953398&lang=de' | |
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
# Migrate from sentry-comments to build in notes. | |
# | |
# See also https://github.com/andialbrecht/sentry-comments/issues/11 | |
# Especially when you're upgrading from Sentry 6.3. | |
# | |
# To run this script: | |
# sentry --config=your.conf.py shell | |
# >>> import migratecomments.py | |
# >>> migratecomments.migrate() | |
# |
OlderNewer