Skip to content

Instantly share code, notes, and snippets.

@jdewit
jdewit / ngrxintro.md
Created February 24, 2017 19:02 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@jdewit
jdewit / rename
Created May 16, 2014 19:42
Rename files/folder names recursively
#!/bin/bash
# Convert filenames to lowercase
# and replace characters recursively
#####################################
if [ -z $1 ];then echo Give target directory; exit 0;fi
find "$1" -depth -name '*' | while read file ; do
directory=$(dirname "$file")
oldfilename=$(basename "$file")
@jdewit
jdewit / vim74_lua
Last active January 30, 2024 04:57
Installing vim 7.4 with lua on Ubuntu 12.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim
sudo rm /usr/bin/vim
@jdewit
jdewit / unuconvd_template
Last active March 21, 2021 03:38
unoconv daemon
### BEGIN INIT INFO
# Provides: unoconvd
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: unoconvd Converting documents to PDF by unoconv
### END INIT INFO
#!/bin/sh
case "$1" in
@jdewit
jdewit / unoconvd.yml
Last active August 29, 2015 13:56
Ansible unoconv task. Tested on Ubuntu 12.04
---
# unoconvd template can be found at https://gist.github.com/jdewit/9038765
- name: Unoconv | Install dependencies
action: apt pkg={{ item }} state=installed
tags: unoconv
with_items:
- openjdk-6-jdk
- libreoffice-core
@jdewit
jdewit / canadian_cities.php
Last active April 9, 2024 03:59
Array of Canadian cities
array("Alberta" => array(
,"Airdrie"
,"Grande Prairie"
,"Red Deer"
,"Beaumont"
,"Hanna"
,"St. Albert"
,"Bonnyville"
,"Hinton"
,"Spruce Grove"
@jdewit
jdewit / world.js
Last active March 24, 2016 23:39
world.js file for cucumberjs using phantomjs and protractor.
var assert = require('chai').assert,
path = require('path'),
browserName = process.env.browser || 'chrome',
protractor = require('protractor'),
webdriver = require('selenium-webdriver'),
exec = require('child_process').exec,
util = require('util')
;
var driver = new webdriver.Builder().usingServer('http://localhost:4444/wd/hub').withCapabilities(webdriver.Capabilities[browserName]()).build();
@jdewit
jdewit / bootstrap_chosen.less
Last active December 30, 2015 18:19
some styling to get chosen looking pretty with bootstrap 3
.chosen-container {
width: 100% !important;
font-size: 16px;
.search-choice span {
font-size: 16px;
display: inline-block;
padding: 2.5px;
}
Prevent workspace switching on mousewheel
Settings Manager -> Window Manager Tweaks -> Workspaces tab.
@jdewit
jdewit / nginx
Created October 20, 2013 17:08
nginx config
sudo add-apt-repository ppa:nginx/stable