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
#!/bin/sh | |
# This script will install the files below. | |
# Please look through them first so you know what will happen. | |
# Install by running this command: | |
# curl -fL https://gist.githubusercontent.com/stefansundin/7003429/raw/install-kbd-backlight.sh | sh | |
# Uninstall with: | |
# sudo rm /opt/kbd-{backlight,lock}.sh /etc/pm/sleep.d/70-kbd-backlight | |
# rm ~/.config/autostart/kbd-{backlight,lock}.sh.desktop |
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
! Chromebook Pixel Xmodmap | |
! https://gist.github.com/stefansundin/6987698 | |
! setxkbmap -layout se | |
! xmodmap .Xmodmap | |
! xev | |
! Startup applications: | |
! Command: sh -c "xmodmap ~/.Xmodmap" | |
! I also manually bind F4 and F5 in Ubuntu's keyboard shortcuts: |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Module> | |
<ModulePrefs title="PayPal gadget" author="Stefan Sundin" width="400" height="35"></ModulePrefs> | |
<UserPref name="business" datatype="string" default_value="8727MAF7NTYRE" /> | |
<UserPref name="item_number" datatype="string" default_value="Donation" /> | |
<UserPref name="amount" datatype="string" default_value="$5.00" /> | |
<UserPref name="return_url" datatype="string" default_value="" /> | |
<UserPref name="return_text" datatype="string" default_value="" /> | |
<Content type="html"> | |
<
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
<?php | |
/* | |
https://gist.github.com/stefansundin/5519170 | |
Converts GData feeds for YouTube Live events to human readable feeds. | |
http://stefansundin.com/blog/476 | |
https://developers.google.com/youtube/2.0/developers_guide_protocol_retrieving_live_events | |
Use this url to get data for streams that no longer appear in any of the feeds: | |
https://gdata.youtube.com/feeds/api/users/CHANNELNAME/live/videos/VIDEOID?v=2 | |
It does not appear to contain all of the info though. Replace CHANNELNAME and VIDEOID. |
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
<?php | |
/* | |
https://gist.github.com/stefansundin/5224325 | |
https://code.google.com/p/support/wiki/PostCommitWebHooks | |
To use PHP to verify the authentication hash, you can do this. It supports multiple projects and can also run svnsync. However, this requires you to make your web server user (often 'www-data') to be able to launch svnsync without sudo having to ask for a password: | |
$ sudo visudo | |
Then add this to the bottom (it's important that it is in the bottom!): | |
www-data ALL=(ALL) NOPASSWD:/usr/bin/svnsync |
NewerOlder