This file contains 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
#! /usr/bin/env python2 | |
'''Use your webcam to open a QR code embedded URL with your default web browser.''' | |
from qrtools import QR | |
import webbrowser | |
myCode = QR() | |
myCode.decode_webcam(lambda data: webbrowser.open(data)) |
This file contains 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
#!/usr/bin/env bash | |
# Additional 32-bit libraries needed to run the game Salvation Prophecy on 64-bit Debian systems. | |
# This was crafted on Ubuntu 14.04. Use ldd on the SalvationProphecy binary | |
# to determine if there any additional libraries required on your distro. | |
sudo apt-get install libxaw7:i386 libjasper1:i386 liblcms1:i386 |
This file contains 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
Example, to kill the Thunderbird app: | |
# fuck thunderbird | |
(ノಠ益ಠ)ノ彡pɹıqɹǝpunɥʇ |
This file contains 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
#this function replaces an existing index with a new one. | |
def replace_item(inventory,new_item): | |
for i,item in enumerate(inventory): | |
if item != new_item: | |
inventory[i] = new_item | |
return inventory | |
my_inv = [0]*26 | |
sword = "sword" | |
bow = "bow" |
This file contains 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
def replace_item(inventory, item): | |
for item in range( len(list) ): | |
if item != new_item: | |
list[item] = new_item | |
return list | |
inventory = range(26) | |
new_item = "" | |
print replace_item(inventory, new_item) |
This file contains 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
#!/usr/bin/ruby | |
# ruby script to create a directory structure from indented data. | |
# Three ways to use it: | |
# - Pipe indented (tabs or 2 spaces) text to the script | |
# - e.g. `cat "mytemplate" | planter.rb | |
# - Create template.tpl files in ~/.planter and call them by their base name | |
# - e.g. Create a text file in ~/.planter/site.tpl | |
# - `planter.rb site` | |
# - Call planter.rb without input and it will open your $EDITOR to create the tree on the fly | |
# You can put %%X%% variables into templates, where X is a number that corresponds to the index |
This file contains 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
#!/usr/bin/env bash | |
dir=$(dirname $0) | |
gconfdir=/apps/gnome-terminal/profiles | |
echo # This makes the prompts easier to follow (as do other random echos below) | |
######################## | |
### Select a profile ### | |
######################## |
NewerOlder