Skip to content

Instantly share code, notes, and snippets.

View wadtech's full-sized avatar

Peter Mellett wadtech

View GitHub Profile
@wadtech
wadtech / build_openbr.sh
Last active March 15, 2016 14:13 — forked from hfeeki/build_openbr.sh
Build openbr in ubuntu
# Install GCC 4.7.3
sudo apt-add-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install -y build-essential
# Install CMake 2.8.10.1
sudo apt-get install -y cmake cmake-curses-gui
wget ftp://ftp.lyx.org/pub/linux/distributions/0linux/archives_sources/opencv/opencv-2.4.5.tar.gz
tar -xf opencv-2.4.5.tar.gz
@wadtech
wadtech / magento_removeAllCategories.sql
Last active August 29, 2015 14:27 — forked from jklance/magento_removeAllCategories.sql
Magento: Remove all categories from a store
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;
@wadtech
wadtech / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
#! /bin/sh
### BEGIN INIT INFO
# Provides: chef-client
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Initscript to run chef-client daemon
# Description: Starts the chef-client daemon automatically upon start
### END INIT INFO
@wadtech
wadtech / chef_solo_bootstrap.sh
Created April 12, 2012 19:40 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo for Ubuntu Precise
#!/usr/bin/env bash
sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
make
sudo make install