This file contains hidden or 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
| ; Command left, right and shift | |
| #Up::Send {PgUp} | |
| #Down::Send {PgDn} | |
| #+Up::Send {LShift down}{PgUp}{LShift Up} | |
| #+Down::Send {LShift down}{PgDn}{LShift Up} | |
| #Left::Send {Home} | |
| #Right::Send {End} | |
| #+Right::Send {LShift down}{End}{LShift Up} | |
| #+Left::Send {LShift down}{Home}{LShift Up} |
This file contains hidden or 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 os | |
| from urllib.parse import unquote | |
| from xml.dom import minidom | |
| import shutil | |
| import sys | |
| # Read all files alongside this script | |
| for FILE in os.listdir('.'): | |
| if '.xspf' in FILE: |
This file contains hidden or 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
| import os | |
| import shutil | |
| import imghdr | |
| import pyglet | |
| drive = os.getcwd()[0][:1] | |
| username = os.environ.get('USERNAME') | |
| fullpath = drive + ':\\Users\\' + username + '\\AppData\\Local\\Packages\\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\\LocalState\\Assets' | |
| localpath = os.path.join(os.getcwd(), 'images') |
This file contains hidden or 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 add . | |
| git commit -a -m %2 | |
| git push | |
| for /f "delims=" %%i in ('git rev-parse --symbolic-full-name --abbrev-ref HEAD') do set output=%%i | |
| git checkout %1 | |
| git merge %output% --no-edit | |
| git push | |
| git checkout %output% |
This file contains hidden or 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
| import os | |
| from flask import Flask, render_template | |
| app = Flask(__name__) | |
| app.debug = True | |
| @app.route('/') | |
| def hello_world(): | |
| return 'Hello, World!' | |
| @app.route('/hello/<name>') |
This file contains hidden or 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
| (function () { | |
| 'use strict'; | |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| sass: { | |
| dist: { | |
| files: { | |
| './style/main.css': './style/main.scss' | |
| } |
This file contains hidden or 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
| from PyPDF2 import PdfFileMerger, PdfFileReader | |
| import glob | |
| merger = PdfFileMerger() | |
| for filename in glob.glob("*.pdf"): | |
| merger.append(PdfFileReader(file(filename, 'rb'))) | |
| merger.write("document-output.pdf") |
This file contains hidden or 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/python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (C) 2012, 2013 Emilio Coppola [email protected] | |
| import commands, sys | |
| from PyQt4 import QtGui, QtCore | |
| class MainWindow(QtGui.QMainWindow): | |
| def __init__(self): | |
| QtGui.QWidget.__init__(self) | |
| quitAction = QtGui.QAction("E&xit", self, shortcut="Ctrl+Q",triggered=QtGui.qApp.quit) |