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
#!/bin/bash | |
#set url and port to the xbmc box webservice | |
XBMC_HOST="http://192.168.0.7:8083" | |
if [ "$1" = "" ]; then | |
echo -n "Insert URL: " | |
read url | |
else | |
url="$1" | |
fi |
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
# No serial cable: | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.332839] usb 1-1.4: new full-speed USB device number 65 using ehci_hcd | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.427006] usb 1-1.4: New USB device found, idVendor=067b, idProduct=2303 | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.427014] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.427018] usb 1-1.4: Product: USB-Serial Controller | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.427022] usb 1-1.4: Manufacturer: Prolific Technology Inc. | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.427579] pl2303 1-1.4:1.0: pl2303 converter detected | |
Mar 28 20:55:32 mbp-buntu-work mtp-probe: checking bus 1, device 65: "/sys/devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.4" | |
Mar 28 20:55:32 mbp-buntu-work kernel: [121438.429210] usb 1-1.4: pl2303 converter now attached to ttyUSB0 |
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
$ sudo aptitude install wine1.4 | |
[sudo] password for WhatWhereAmI: | |
The following NEW packages will be installed: | |
fonts-droid{a} gcc-4.6-base:i386{a} gettext:i386{ab} gettext-base:i386{ab} gnome-exe-thumbnailer{a} icoutils{a} libasn1-8-heimdal:i386{a} | |
libasound2:i386{a} libavahi-client3:i386{a} libavahi-common-data:i386{a} libavahi-common3:i386{a} libc6:i386{a} libcapi20-3:i386{a} libcomerr2:i386{a} | |
libcroco3:i386{a} libcups2:i386{a} libdb5.1:i386{a} libdbus-1-3:i386{a} libdrm-intel1:i386{a} libdrm-nouveau1a:i386{a} libdrm-radeon1:i386{a} | |
libdrm2:i386{a} libexif12:i386{a} libexpat1:i386{a} libffi6:i386{a} libfontconfig1:i386{a} libfreetype6:i386{a} libgcc1:i386{a} libgcrypt11:i386{a} | |
libgd2-xpm:i386{a} libgettextpo0:i386{a} libgif4:i386{a} libgl1-mesa-dri:i386{a} libgl1-mesa-glx:i386{a} libglapi-mesa:i386{a} libglib2.0-0:i386{a} | |
libglu1-mesa:i386{a} libgnutls26:i386{a} libgomp1:i386{a} libgpg-error0:i386{a} libgphoto2-2:i386{a} libgphoto2-port0:i386{a} libgpm2:i386{a} | |
libgssapi-krb5-2: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
Error: EACCES, Permission denied | |
at Server._doListen (net.js:1100:5) | |
at net.js:1071:14 | |
at Object.lookup (dns.js:153:45) | |
at Server.listen (net.js:1065:20) | |
at Object.listen (/node_modules/socket.io/lib/socket.io.js:67:12) | |
at Object.<anonymous> (/app/lib/server/server.js:41:12) | |
at Object.<anonymous> (/app/lib/server/server.js:131:4) | |
at Module._compile (module.js:402:26) | |
at Object..js (module.js:408:10) |
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
#include <string.h> | |
/************************* | |
* strcmp_test | |
* | |
* Outputs basic test of strcmp as defined in ascii c string.h by default. Pass | |
* exactly two parameter strings in order to test those two strings. | |
* | |
* Examples: | |
* $ ./strcmp_test |
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 build_address_lines(record) | |
lines = [] | |
%w{store_name address1 address2 address3}.each do |field| | |
lines << record[field].strip unless record[field].blank? | |
end | |
last_line = '' | |
%w{city state zip country}.each do |field| | |
last_line << ' ' + record[field].strip unless record[field].blank? | |
end | |
lines << last_line unless last_line.blank? |
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
module Paperclip | |
# Handles thumbnailing images that are uploaded. | |
class Cropper < Thumbnail | |
def initialize file, options = {}, attachment = nil | |
super | |
geometry = options[:geometry] | |
@file = file | |
@crop = geometry[-1,1] == '#' | |
@pad = geometry[-1,1] == '&' |
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
require({ | |
baseUrl: 'js/', | |
// set the paths to our library packages | |
packages: [ | |
{ | |
name: 'dojo', | |
location: 'dojo/dojo', | |
main: '/main', | |
lib: '.' |
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
#!/bin/bash | |
# DO THIS FIRST: | |
# sudo aptitude install libnotify-bin alsa-utils | |
# INSTALL: | |
# mkdir ~/bin | |
# cp ~/Downloads/vol ~/bin/vol | |
# chmod +x ~/bin/vol |
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
import sublime, sublime_plugin | |
import os | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Detects current file type if the file's extension isn't conclusive """ | |
""" Modified for Ruby on Rails and Sublime Text 2 """ | |
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """ | |
def on_load(self, view): | |
filename = view.file_name() |