Skip to content

Instantly share code, notes, and snippets.

Avatar

Manu m3nu

View GitHub Profile
@codito
codito / dbus_demo.py
Last active Apr 5, 2021
QtDBus demo with PyQt5
View dbus_demo.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from PyQt5 import QtCore, QtDBus, QtWidgets
def notify(header, msg):
item = "org.freedesktop.Notifications"
path = "/org/freedesktop/Notifications"
interface = "org.freedesktop.Notifications"
@atais
atais / cask_upgrade.sh
Last active Sep 11, 2021
Script upgrading outdated brew casks
View cask_upgrade.sh
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
View performanceReportREADME.txt
###############################################################################
# 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
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@thertrader
thertrader / performanceReportREADME.txt
Last active Oct 30, 2020
Trading Strategies Performance Report with R and Knitr
View performanceReportREADME.txt
###############################################################################
# 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
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@pitch-gist
pitch-gist / gist:2999707
Created Jun 26, 2012
HTML: Simple Maintenance Page
View gist:2999707
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@vadimg
vadimg / timeout.py
Created Jun 9, 2012
python timeout decorator
View timeout.py
import threading
import functools
import logging
def timeout(duration, default=None):
def decorator(func):
class InterruptableThread(threading.Thread):
def __init__(self, args, kwargs):
threading.Thread.__init__(self)
self.args = args
@nicerobot
nicerobot / chrome-cookies.sh
Created Dec 7, 2011
Convert Google Chrome sqlite Cookies into cookies.txt. Useful for utilities like curl.
View chrome-cookies.sh
sqlite3 -separator ' ' ${COOKIES:-Cookies} \
'select host_key, "TRUE", path, "FALSE", expires_utc, name, value from cookies'