# Kompilera erb-filen till html
ruby example.rb
# Visa resultatet i webbläsaren
open index.html
brew install node
for using NodeJS and packages from npm (Node Package Manager)
npm install uglify-js
for combining and minifying of JavaScript
https://www.npmjs.org/package/uglify-js
gem install sass
for combining and minifying of CSS
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
// Generated on 2013-11-12 using generator-angular 0.5.1 | |
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to recursively match all subfolders: | |
// 'test/spec/**/*.js' | |
// | |
var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest; |
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
# Infinitely do something, wait half a second between iterations | |
infdo () { | |
while true; do | |
$@ | |
echo "restarting $@..." | |
sleep 0.5 | |
done | |
} |
# Skapa en fil ~/cronjob.sh
# Testinnehåll för filen, skapar en ny fil varje minut om det fungerar
touch ~/$(date +%%Y%m%d-%H%M)
# Se till att filen är körbar
chmod +x ~/cronjob.sh
# Öppna crontab i en editor
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
Apr 15 08:47:45 albert-mbp kernel[0]: virtual bool IOHIDEventSystemUserClient::initWithTask(task_t, void *, UInt32): Client task not privileged to open IOHIDSystem for mapping memory (e00002c1) | |
Apr 15 08:47:45 albert-mbp.local System Preferences[529]: void __IOHIDEventQueueuRegister(): Unable to open IOHIDSystem (e00002bd) |
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
# Create a new server | |
# Always choose a LTS (Long Term Stable) ubuntu release, | |
# such as 12.04, 14.04 etc | |
apt-get update | |
# Pick and choose what you need | |
apt-get install tmux | |
apt-get install git-core |
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
# | |
# Bootstrap 3 integration for rails form_for | |
# | |
class BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
# Creates a .form-group which adds .has-error automatically | |
# Usage: | |
# <%= f.form_group :attribute_name %> | |
# Result: | |
# <div class="form-group has-error" /> | |
# http://stackoverflow.com/a/22183501 |
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
export LANG=sv_SE.UTF-8 | |
export LANGUAGE=sv:en | |
export LC_CTYPE=sv_SE.UTF-8 | |
export LC_NUMERIC=sv_SE.UTF-8 | |
export LC_TIME=sv_SE.UTF-8 | |
export LC_COLLATE="sv_SE.UTF-8" | |
export LC_MONETARY=sv_SE.UTF-8 | |
export LC_MESSAGES="sv_SE.UTF-8" | |
export LC_PAPER=sv_SE.UTF-8 | |
export LC_NAME=sv_SE.UTF-8 |
Add a new automator script, choose type: Service
Choose input: none
Tell it to run a shell script:
# Path to where you saved pbqropen
$HOME/.bin/pbqropen
OlderNewer