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 | |
# Based on http://docs.cs-cart.com/4.3.x/install/digitalocean.html | |
curl -sL http://cartoma.tk/installer | bash -s -- cart.is-by.us | |
cd /var/www/html/cart.is-by.us | |
wget "https://www.cs-cart.com/index.php?dispatch=pages.get_trial&page_id=297&edition=ultimate" -O cscart.zip && unzip cscart.zip | |
chown -R service ./ | |
chmod 644 config.local.php | |
chmod -R 755 design images var | |
find design -type f -print0 | xargs -0 chmod 644 | |
find images -type f -print0 | xargs -0 chmod 644 |
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
/** | |
* Small refresher on how to use sqlite3 embedded in node.js | |
* | |
* LINKS: | |
* - Package: https://www.npmjs.com/package/sqlite3 (NOTE: Includes correct platform binary of sqlite3. No extra install required.) | |
* - API: https://github.com/mapbox/node-sqlite3/wiki/API | |
*/ | |
var sqlite3 = require('sqlite3').verbose(); | |
// var db = new sqlite3.Database('./dbfiles/testdb'); |
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
# I really enjoyed "Bash One Liner - Compose Music From Entropy in /dev/urandom" | |
# From http://blog.robertelder.org/bash-one-liner-compose-music/ | |
# | |
# This is a collection of one liners that work on Mac OSX | |
# You need sox | |
brew install sox | |
# Major scale | |
cat /dev/urandom | hexdump -v -e '/1 "%u\n"' | awk '{ split("0,2,4,5,7,9,11,12",a,","); for (i = 0; i < 1; i+= 0.0001) printf("%08X\n", 100*sin(1382*exp((a[$1 % 8]/12)*log(2))*i)) }' | xxd -r -p | sox -v 0.25 -traw -r16000 -b32 -e signed-integer - -tcoreaudio |
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 | |
sudo apt-get -y install cups | |
sudo apt-get -y install cups-pdf | |
# add pdf printer to cups | |
# - named files end up in ~/PDF/ | |
# - unnamed files are stored in /var/spool/cups-pdf/ANONYMOUS/, such as PDF:s created by streaming bytes over an API | |
sudo lpadmin -p cups-pdf -v cups-pdf:/ -E -P /usr/share/ppd/cups-pdf/CUPS-PDF.ppd |
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 | |
sudo rsync -avz --delete --one-file-system / /boot [email protected]:/home/hydrobackup/backups |
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
# Quick Summary Of Balcony Hydroponic Garden | |
## Rig | |
- 2*120cm PVC pipe + bends and fittings | |
- 60l capcaity tank with about 25l nutrient water. | |
- 4*2 holes, 7 chilis, 1 tomato | |
- Type: [Nutrient Film Technique](http://en.wikipedia.org/wiki/Nutrient_film_technique) | |
- Pump schedule: 4 runs per hour, 20 seconds per run (pump a bit too powerful) | |
[The rig](http://i.imgur.com/T3ySmOS.jpg) |
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 iptables -L -n |
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 | |
su - | |
mkdir ./downloads | |
cd downloads | |
rm -rf /uss/lib/iojs* | |
rm /usr/bin/iojs | |
rm /usr/bin/node | |
rm /usr/bin/npm |
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 | |
# | |
# ____ Install Uncomplicated Firewall (frontend to iptables) | |
# | |
sudo apt-get install -y ufw | |
# Be paranoid | |
sudo ufw disable |
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 | |
# From http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html | |
# | |
# You need to run this script as root | |
# | |
# su - | |
echo "INSTALLING JAVA 8 AS USER `whoami` " | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list |