sudo apt-get update -y
sudo apt-get install git-core build-essential -y
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
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2 | |
brew install encfs --use-gcc |
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
/usr/local/Library/ENV/4.3/cc in a text editor and replace "-march=native" with "-march=core2". |
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/bash | |
# | |
#This init script autostarts necessary vms at boot | |
#and saves running vms on shutdown | |
# Sed explanation: sed -e 's/^.//' -e 's/.$//' | |
# 1. -e means to allow multiple arguments in a single sed command | |
# 2. 's/^.//' means to substitute (s) / at the beginning of the line (^), any character (.) / [substitute with nothing] / | |
# 3. 's/.$//' means to substitute (s) / any character (.), at the end of the line / [substitute with nothing] / |
Three things to remember while configuring a couchapp to run as a web facing application. Below, I document the steps I took to deploy the example pages
app from couchapp.org.
-
set the vhost in
/etc/couchdb/local.ini
.[vhosts] home.btbytes.com = /pages/_design/pages/_rewrite
-
add vhosts entry to couchdb by visiting
configuration
page in futon app and adding a new section:
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
# Add this line to your software sources | |
deb http://debian.meebey.net/experimental/mono / | |
sudo apt-get update | |
# of course, apt-get remove mono-complete first... | |
sudo apt-get install mono-complete | |
# I installed monodevelop from apt just to get all the prereqs | |
sudo apt-get install monodevelop |
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
apt-get install ifenslave | |
echo "bonding" >> /etc/modules | |
cat /etc/network/interfaces | |
# interfaces(5) file used by ifup(8) and ifdown(8) | |
auto lo eth0 wlan0 bond0 | |
iface lo inet loopback | |
# Do not receive dhcp on eth0 | |
iface eth0 inet manual |
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
SELECT ci.inventory_id, ci.inventory_quantity, cd.reservations, (ci.inventory_quantity + cd.reservations) as gesamt | |
FROM catalog_inventory ci | |
JOIN | |
(SELECT cd.documentation_inventory_nr, SUM(IF(cd.documentation_on >= UNIX_TIMESTAMP(NOW()),cd.documentation_quantity,0)) as reservations | |
FROM | |
catalog_documentation cd | |
GROUP BY cd.documentation_inventory_nr) as cd | |
ON cd.documentation_inventory_nr=ci.inventory_id | |
GROUP BY ci.inventory_id |
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
var style = '.videoWrapper { position: relative; padding-bottom: 56.25%; /* 16:9 */ padding-top: 50px; height: 0;} .videoWrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:none;}'; | |
var htmlDiv = document.createElement('style'); | |
htmlDiv.innerHTML = style; | |
document.getElementsByTagName('head')[0].appendChild(htmlDiv); | |
String.prototype.toDOM=function(){ | |
var d=document | |
,i | |
,a=d.createElement("div") |
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
cat /etc/usbpower | |
#!/bin/bash | |
# This script attempts to read /sys/devices/ and identify usb ports and devices | |
# that can be toggled to enable wakeup from sleep. | |
# | |
# Version: 2.0 | |
# Date written: August 20, 2012 | |
# | |
# Copyright (C) 2012 danomac @ gentoo forums |