Skip to content

Instantly share code, notes, and snippets.

View greenlieber's full-sized avatar

Dennis Green-lieber greenlieber

View GitHub Profile
javascript:(function() {var e = document.getElementById('pull_request_body');if (e) {e.value += '#### Description \n\n\n#### TP tickets ID? \n\n\n#### Notification to (optinal ex. @paw)? \n\n\n';
}})();
version=1.7.0.2
wget http://www.magentocommerce.com/downloads/assets/$version/magento-$version.tar.gz
tar -zxvf magento-$version.tar.gz
mv magento/* magento/.htaccess .
chmod -R o+w media var
chmod o+w app/etc
rm -rf magento/ magento-$version.tar.gz
rm -rf index.php.sample LICENSE.txt LICENSE.html LICENSE_AFL.txt php.ini.sample RELEASE_NOTES.txt
#!/bin/bash
# log into your server
ssh root@[server ipaddress]
# change root password
passwd
# update all packages and operating system
apt-get update && apt-get --yes upgrade
mkdir demo
cd demo
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
tar -zxvf magento-1.7.0.2.tar.gz
tar -zxvf magento-sample-data-1.6.1.0.tar.gz
mv magento-sample-data-1.6.1.0/media/* magento/media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
@greenlieber
greenlieber / es.sh
Created September 1, 2012 07:53
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.0.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
@greenlieber
greenlieber / fs.removeRecursive.js
Created July 27, 2012 13:56
nodejs, delete a folder recursively, async with callback
// ### removeRecursive
// NodeJS:
// Delete a file or delete a DIR recursively
// be aware that this is a power full delete function
// so best is to check if the PATH given is really
// the path you want to DELETE ENTIRELY
//
// ### usage example
// remove a folder recursively
//
@greenlieber
greenlieber / mobile-meta-links.html
Created July 6, 2012 11:05
iOS Web App Configuration
@greenlieber
greenlieber / basics.sh
Created June 25, 2012 19:00 — forked from aaronshaf/basics.sh
Install Basics, Apache, MongoDB, UFW, node.js, and Lithium
cd ~
echo "Server name: "
read server_name
#Basic installs
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install htop apache2 php5 php-pear php5-dev ufw subversion screen git-core php-pear build-essential openssl libssl-dev php5-dev libcurl4-openssl-dev libxml2-dev php5-curl unzip python-software-properties -y
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wapa Mobil</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="initial-scale=1.0">
<meta name="viewport" content="maximum-scale=1.0">
<meta name="viewport" content="user-scalable=no">
<meta name="viewport" content="width=device-width">
@greenlieber
greenlieber / gist:2891277
Created June 7, 2012 20:11 — forked from padolsey/gist:527683
javaScript : detect ie
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}