Skip to content

Instantly share code, notes, and snippets.

View joelbowen's full-sized avatar

Joel Bowen joelbowen

View GitHub Profile
@joelbowen
joelbowen / Accessing XAMPP MySQL Client
Created July 19, 2013 16:55
MySQL Client in XAMPP
alias mysql=/Applications/xampp/xamppfiles/bin/mysql
alias mysqladmin=/Applications/xampp/xamppfiles/bin/mysqladmin
@joelbowen
joelbowen / InstallNodeJSonUbuntu.sh
Created September 6, 2013 20:47
Node.js on Ubuntu
$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
$ sudo apt-get install nodejs
$ node -v
@joelbowen
joelbowen / installMakeGypBuildEssentials.txt
Created November 27, 2013 17:52
Install make and gyp for certain NPM tasks on Ubuntu (build essentials)
sudo apt-get update
sudo apt-get upgrade
/*For make and gyp tasks:*/
sudo apt-get install build-essential
@joelbowen
joelbowen / UbuntuInstallMongoDB
Created November 27, 2013 18:12
Get mongoDB on ubuntu
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
$ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
$ sudo apt-get update
$ sudo apt-get install mongodb-10gen
@joelbowen
joelbowen / restartMysql
Last active July 11, 2021 06:38
Restarting MySQL or HTTP on Amazon EC2
$ ssh -i KEYNAME.pem ec2-user@IPADDRESS
$ sudo service mysqld status
$ sudo service httpd status
"mysqld dead but subsys locked"
$ sudo service mysqld restart
Stopping mysqld: [ OK ]
@joelbowen
joelbowen / Heartblead Ubuntu Upgrade when apt-get not properly updating
Last active August 29, 2015 14:00
Heartblead Ubuntu Upgrade when apt-get not properly updating:
List of packages I had to download and install
64 Bit
openssl: http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1-4ubuntu5.12_amd64.deb
libssl1.0.0: http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.0.0_1.0.1-4ubuntu5.12_amd64.deb
libssl-dev: http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.1-4ubuntu5.12_amd64.deb
32 Bit
http://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.1-4ubuntu5.12_i386.deb
http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.0.1c-3ubuntu2.7_i386.deb

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)

@joelbowen
joelbowen / Dockerfile
Created November 2, 2015 05:53
Aptible: PhantomJS via Docker
# Dockerfile
FROM quay.io/aptible/autobuild
ENV PHANTOMJS_VERSION 1.9.8
RUN \
apt-get update && \
apt-get upgrade -y && \
apt-get install -y vim git wget libfreetype6 libfontconfig bzip2 && \
mkdir -p /srv/var && \
wget -q --no-check-certificate -O /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 && \
tar -xjf /tmp/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C /tmp && \
@joelbowen
joelbowen / angularjs-providers-explained.md
Created January 21, 2016 02:46 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

[
{
"name": "Alabama",
"abbreviation": "AL"
},
{
"name": "Alaska",
"abbreviation": "AK"
},
{