This file contains 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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
This file contains 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
module.exports = function (Category) { | |
Category.observe('before delete', function (ctx, next) { | |
var Product = ctx.Model.app.models.Product; | |
Product.find({ | |
where: { | |
categoryId: ctx.where.id | |
} |
This file contains 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 | |
# Create swapfile | |
fallocate -l 1G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
# Activate swapfile on boot | |
echo '# Activate swapfile on boot' >> /etc/fstab | |
echo '/swapfile none swap sw 0 0' >> /etc/fstab |
This file contains 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 | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
This file contains 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
function git-diff-search() { grep -ir $1 $(git diff --cached --name-only || git diff --name-only)} |
This file contains 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 | |
# Stops accidental commits to master and develop. https://gist.github.com/beeman/494de3a1ec14f9e6bd31 | |
# Copied from https://gist.github.com/stefansundin/9059706 | |
# Install: | |
# cd path/to/git/repo | |
# curl -fL -o .git/hooks/pre-commit https://gist.githubusercontent.com/beeman/494de3a1ec14f9e6bd31/raw/pre-commit | |
# chmod +x .git/hooks/pre-commit | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
This file contains 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
➜ ~/workspace/scratch $ git clone https://github.com/strongloop/loopback-example-pubsub.git | |
Cloning into 'loopback-example-pubsub'... | |
remote: Counting objects: 6691, done. | |
remote: Total 6691 (delta 0), reused 0 (delta 0), pack-reused 6691 | |
Receiving objects: 100% (6691/6691), 8.63 MiB | 4.41 MiB/s, done. | |
Resolving deltas: 100% (1174/1174), done. | |
Checking connectivity... done. | |
➜ ~/workspace/scratch $ cd loopback-example-pubsub | |
➜ [master] ~/workspace/scratch/loopback-example-pubsub $ npm install | |
npm WARN package.json strong-pubsub-angular-loopback@1.0.0 No license field. |
This file contains 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
<?php | |
App::uses('Shell', 'Console'); | |
class RelationsShell extends Shell { | |
var $relations = array('hasMany', 'belongsTo', 'hasAndBelongsToMany'); | |
var $structure = array(); | |
/** |
This file contains 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
Verifying that +beeman is my blockchain ID. https://onename.com/beeman |
OlderNewer