Skip to content

Instantly share code, notes, and snippets.

View camilleriluke's full-sized avatar
🐢

Luke Camilleri camilleriluke

🐢
View GitHub Profile
@camilleriluke
camilleriluke / combined-lifecycle-events-class.js
Last active February 27, 2018 11:30
Durandal Combined Lifecycle events
canDeactivate(...args) {
console.log('canDeactivate', ...args);
return true;
}
canActivate(...args) {
console.log('canActivate', ...args);
return true;
}
@camilleriluke
camilleriluke / cz-conventional-changelog-casumo.install.sh
Created August 16, 2017 16:59
Using cz-conventional-changelog-casumo
npm install -g commitizen
npm install -g git+https://[email protected]/camilleriluke/cz-conventional-changelog-casumo.git
echo '{ "path": "cz-conventional-changelog-casumo" }' > ~/.czrc
@camilleriluke
camilleriluke / random-game-icons.js
Created June 19, 2017 12:33
Random game icons 🎱🎮🎳
_.times(3, _.partial(_.sample, ['🀄','🃏','🎮','🎯','🎰','🎱','🎲','🎳','🎴','🎾','🏀','🏅','🏈','🏉','🏌','🏏','🏐','🏑','🏒','🏓','🏟️','🏸','👾','🕹️','🤽'])).join('')
@camilleriluke
camilleriluke / flow-example.js
Last active May 30, 2017 13:43
✔️ Simple type annotated flow example
// @flow
import type {KnockoutComputed, KnockoutObservable} from 'knockout';
import ko from 'knockout';
interface FooJSON {
name: string;
surname: string;
}
interface FooModel {
@camilleriluke
camilleriluke / partyparrot.text
Created September 1, 2016 10:42
Party Parrot
:fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot:
:party-parrot-conga:                :party-parrot-conga-reverse:
:party-parrot-conga:      *PARTY PARROT Crew*      :party-parrot-conga-reverse:
:party-parrot-conga:                :party-parrot-conga-reverse:
:party-parrot-conga:        :party-parrot:        :party-parrot-conga-reverse:
:party-parrot-conga:                :party-parrot-conga-reverse:
:party-parrot-conga:                :party-parrot-conga-reverse:
:fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot::fast-parrot:
@camilleriluke
camilleriluke / .gitconfig
Last active February 14, 2019 12:55
gitconfig primer
[core]
excludesfile = /Users/CHANGE_HERE/.gitignore_global
pager = diff-so-fancy | less -r
editor = code -w
[user]
name = YOUR_NAME
useConfigOnly = true
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
ignore-file = !git update-index --assume-unchanged
@camilleriluke
camilleriluke / prepare-commit-msg
Last active February 9, 2019 07:50
prepare-commit-msg
#!/bin/sh
# Add this in your .git/hooks folder
firstLine=$(head -n1 $1)
if [ -z "$firstLine" ] ;then
BRANCH_NAME=`git rev-parse --abbrev-ref HEAD`
APPEND_TO_COMMIT_MSG="# Branch does not contain an issue id, feel free to add your own.\n\n# Casumo/Home#"
if [[ $BRANCH_NAME == iss* ]]; then
APPEND_TO_COMMIT_MSG="`echo $BRANCH_NAME | sed -e 's/iss\([0-9]*\)\(.*\)/# Casumo\/Home#\1/g'`"
<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1449480248801,1454509691508,1454509733157,1454509751764,1454608046142,1454665081786,1454665089704,1454665095511</id>
<updated>2016-02-08T15:30:39Z</updated>
<author>
<name>Luke Camilleri</name>
<email>[email protected]</email>
</author>
<entry>
<category term='filter'></category>
@camilleriluke
camilleriluke / brew_completer.sh
Last active August 26, 2015 08:14 — forked from ktheory/brew_completer.sh
Bash tab-completion for homebrew
# Bash tab-completion for homebrew (https://github.com/mxcl/homebrew)
###############
# Installation:
# mkdir ~/.bash_completion.d
# curl https://gist.github.com/raw/774554/brew_completer.sh > ~/.bash_completion.d/brew_completer.sh
# echo 'source ~/.bash_completion.d/brew_completer.sh' >> ~/.bashrc
# source ~/.bashrc
@camilleriluke
camilleriluke / landing.html
Created December 3, 2014 17:32
Simple Session Example Test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Session example test</title>
</head>
<body>
<h1>Session exmaple test</h1>
<form action="session-example.php" method="post">
<label for="fullname">Full Name: </label><input type="text" name="fullname">