Skip to content

Instantly share code, notes, and snippets.

View skellertor's full-sized avatar
🫡

Samuela Keller skellertor

🫡
View GitHub Profile
@skellertor
skellertor / remove.md
Last active March 7, 2017 17:06
Remove sensitive data that has been commited to git

Steps copied from

$ git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' --prune-empty --tag-name-filter cat -- --all

$ git push origin --force --all

@skellertor
skellertor / .bash_profile
Created January 29, 2017 18:10
My custom terminal prompt
# Setting color of prompt variable
export PS1='\[\033[0;91m\]\h\[\033[0m\] \[\033[0;97m\]\u:\W\[\033[0m\] \[\033[0;94m\]$\[\033[0m\] '
# Delete every Docker containers
# Must be run first because images are attached to containers
docker rm $(docker ps -a -q)
# Delete every Docker image
docker rmi $(docker images -q)
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master

ctrl + command + j

@skellertor
skellertor / spacers.md
Last active January 23, 2017 21:22
Adding spacers in mac dock
  1. Open command line interface
  2. Type defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'
  3. Type killall Dock
@skellertor
skellertor / osx-mongodb-rlimits-fix.md
Created November 26, 2015 00:48 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist

...containing:

@skellertor
skellertor / install-mongodb.md
Created November 25, 2015 22:11 — forked from adamgibbons/install-mongodb.md
Install MongoDB on Mac OS X 10.9

Install MongoDB with Homebrew

brew install mongodb
mkdir -p /data/db

Set permissions for the data directory

Ensure that user account running mongod has correct permissions for the directory:

@skellertor
skellertor / sublime-build.md
Created October 29, 2015 23:01
Creating custom build files for sublime

Start

@skellertor
skellertor / how_to.md
Last active October 22, 2015 14:37
Using jsTestDriver.js and jasmine.js to test angular

Context

  • You are currently using jsTestDriver as your test runner and assert engine for all vanilla javascript objects. In order to test angular controllers we use jasmine.js version 1.3. Jasmine is another testing framework that sits on top of jsTestDriver. All jasmine versions past 2.0 seem to break some other dependencies such as angular-mocks.js.
  • The order of the includes in the configuration file matters! jasmine.js and JasmineAdapter.js must be before angular.js and angular-mocks.js.
  • The angular controller test cases must be declared after angular and angular mocks.
  • All angular controller tests use jsTestDriver as the test runner, and jasmine as the assert engine.

Adding Angular Controllers to test suite

  • Open up jsTestDriver.conf or javascript_testing_config.jstd. Both are YAML-like configuration files and can be used interchangeably.