Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
'''
Save this file and add the following line to your ~/.bashrc"
export PYTHONSTARTUP="$HOME/.pythonrc"
'''
def run_from_ipython():
try:
__IPYTHON__
return True
@ygbourhis
ygbourhis / redshift-auto-set-manual-location
Last active January 3, 2018 16:31
due to https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/868904 set redshift to use a manual location and configure this location automaticaly
#!/usr/bin/env python
import ConfigParser
import Geoclue
import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import sys
import time
#!/usr/bin/env bash
# Since Opera 51, Opera does not support Trusty even though Trusty is not EOL.
#
# Opera will refuse to install on Trusty only beacuse the new opera package requires libdbus-1-3 (>= 1.9.14)
# However, opera works perfectly well with libdbus-1-3 (>= 1.6.18) on Trusty.
# This script alters the package requirement in order to be able to install opera on Ubuntu Trusty
#
# This script is provided as is, is not afiliated to Opera Software and comes with no support at all.
# Use at your own risks.