Skip to content

Instantly share code, notes, and snippets.

jdewit jdewit

  • Utrecht, NL
View GitHub Profile
@jdewit
jdewit / ngrxintro.md
Created Feb 24, 2017 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series
View ngrxintro.md

#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
Rename files/folder names recursively
View rename
#!/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 Apr 28, 2020
Installing vim 7.4 with lua on Ubuntu 12.04
View vim74_lua
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 Dec 24, 2019
unoconv daemon
View unuconvd_template
### 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 Aug 29, 2015
Ansible unoconv task. Tested on Ubuntu 12.04
View unoconvd.yml
---
# 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 Nov 27, 2019
Array of Canadian cities
View canadian_cities.php
array("Alberta" => array(
,"Airdrie"
,"Grande Prairie"
,"Red Deer"
,"Beaumont"
,"Hanna"
,"St. Albert"
,"Bonnyville"
,"Hinton"
,"Spruce Grove"
@jdewit
jdewit / world.js
Last active Mar 24, 2016
world.js file for cucumberjs using phantomjs and protractor.
View world.js
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 Dec 30, 2015
some styling to get chosen looking pretty with bootstrap 3
View bootstrap_chosen.less
.chosen-container {
width: 100% !important;
font-size: 16px;
.search-choice span {
font-size: 16px;
display: inline-block;
padding: 2.5px;
}
View xubuntu config
Prevent workspace switching on mousewheel
Settings Manager -> Window Manager Tweaks -> Workspaces tab.
@jdewit
jdewit / nginx
Created Oct 20, 2013
nginx config
View nginx
sudo add-apt-repository ppa:nginx/stable
You can’t perform that action at this time.