Skip to content

Instantly share code, notes, and snippets.

View coppolaemilio's full-sized avatar
💻
Working on FOSS

Emi coppolaemilio

💻
Working on FOSS
View GitHub Profile
@coppolaemilio
coppolaemilio / OSX-Keyboard.ahk
Created April 11, 2019 10:40
OSX keyboard bindings for windows
; 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}
@coppolaemilio
coppolaemilio / playlist.py
Last active December 4, 2025 02:36
Copy all files of a VLC .xspf to a folder with the same name. Place the xspf files alongside the script.
# -*- 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:
@coppolaemilio
coppolaemilio / windows_backgrounds.py
Created September 29, 2017 06:48
Get Windows 10 backgrounds lock-screen images.
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')
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%
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>')
@coppolaemilio
coppolaemilio / Gruntfile.js
Created January 10, 2016 22:42
Basic grunt with watch and minify for scss :)
(function () {
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
files: {
'./style/main.css': './style/main.scss'
}
@coppolaemilio
coppolaemilio / pdf_merge.py
Created July 13, 2015 21:39
Little script to merge all the PDFs in the same folder
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")
@coppolaemilio
coppolaemilio / wifisignal.pyw
Created March 19, 2013 08:59
With this program you can get the signal of your current WiFi connection. (Only on Linux)
#!/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)