Add the following to /etc/hdparm.conf
:
apm_battery = 128
package main | |
/* | |
http://play.golang.org/p/3YP3gdwpFG | |
*/ | |
import "fmt" | |
func main() { | |
s := "This is a string." |
#!/usr/bin/python | |
#usage python ppastats.py PPATEAM (ex: webupd8team) PPA (ex: gthumb) DIST (Ubuntu version eg maverick) ARCH (ubuntu arch eg i386 or amd64) | |
#http://www.webupd8.org/2010/12/launchpad-finally-gets-ppa-usage-stats.html | |
#example - highest downloaded file: python ppastats.py webupd8team y-ppa-manager maverick amd64 | tr '\t' ',' | cut -d ',' -f3 | sort -gr | |
import sys | |
from launchpadlib.launchpad import Launchpad | |
PPAOWNER = sys.argv[1] |
import re | |
REMOVE_PATTERN = re.compile(r'\n\s*\{') | |
def compact(django_temp): | |
with open(django_temp) as f: | |
text = f.read() | |
compacted = re.sub(REMOVE_PATTERN, r'{', text) | |
return compacted | |
Add the following to /etc/hdparm.conf
:
apm_battery = 128
#!/bin/bash | |
# 1. Install nautilus-actions and create a new action | |
# 2. Under "Command" tab: "Path" -> "create-launcher.sh" and "Parameters" -> "%f" | |
# 3. Copy create-launcher.sh to somewhere in $PATH and make executable | |
# For some reason the desktop gets sent to nautilus actions as "/", so just make launcher go to desktop | |
# if the current user doesn't own the location sent to the script. | |
if [ -O $1 ]; then | |
PATHNAME=$1 |
#!/bin/bash | |
# Install wmctrl before using: sudo apt-get install wmctrl | |
# From http://ubuntuforums.org/showthread.php?p=11761683 | |
# User settings | |
sleep 8 # Time it takes before script starts with autodetection | |
DELAY="2" # Set delay | |
# End of user settings |
import pyglet | |
from pyglet.gl import * | |
window = pyglet.window.Window() | |
image = pyglet.image.load('circle.png') | |
mask = pyglet.image.load('mask.png') | |
texture = pyglet.image.Texture.create(200, 200) | |
done = False |
temp_image = Image.open("picture.png") | |
raw_image = temp_image.tostring() | |
image = pyglet.image.ImageData(width, height, 'RGB', raw_image, pitch= -resized_x * 3) |
Copy pulseaudio configuration template to home folder.
cp /etc/pulse/default.pa ~/.pulse/default.pa
Append ignore_dB=1
to line with load-module module-udev-detect
.
Make sure "speaker" volume is at 100% using alsamixer (press F6 and select HDA NVidia to see more volume controls.
To make "speaker" volume persist between boots, run alsactl store -f ~/.asoundrc
then make alsactl restore -f ~/.asoundrc
start when logging into your user. (See `Arch Wiki - ALSA`_)
#!/usr/bin/env python | |
from ctypes import Structure, windll, c_uint, sizeof, byref | |
import time | |
class LASTINPUTINFO(Structure): | |
_fields_ = [ | |
('cbSize', c_uint), | |
('dwTime', c_uint), | |
] |