Skip to content

Instantly share code, notes, and snippets.

View camilleriluke's full-sized avatar
๐Ÿข

Luke Camilleri camilleriluke

๐Ÿข
View GitHub Profile
@camilleriluke
camilleriluke / random-game-icons.js
Created June 19, 2017 12:33
Random game icons ๐ŸŽฑ๐ŸŽฎ๐ŸŽณ
_.times(3, _.partial(_.sample, ['๐Ÿ€„','๐Ÿƒ','๐ŸŽฎ','๐ŸŽฏ','๐ŸŽฐ','๐ŸŽฑ','๐ŸŽฒ','๐ŸŽณ','๐ŸŽด','๐ŸŽพ','๐Ÿ€','๐Ÿ…','๐Ÿˆ','๐Ÿ‰','๐ŸŒ','๐Ÿ','๐Ÿ','๐Ÿ‘','๐Ÿ’','๐Ÿ“','๐ŸŸ๏ธ','๐Ÿธ','๐Ÿ‘พ','๐Ÿ•น๏ธ','๐Ÿคฝ'])).join('')
@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 / 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 / asyncIterator-doodling.js
Created June 18, 2018 00:57
AsyncIterator doodling
const sleep = ms => new Promise(r => setTimeout(r, ms));
const numbersFromGenerator = fromI => {
let i = fromI;
return {
[Symbol.asyncIterator]: async function*() {
while (true) {
await sleep(500);
yield i++;
import { concat, defer, empty, of } from "rxjs";
import { flatMap, reduce, scan, take } from "rxjs/operators";
const fetchPage = (pageNumber = 0) =>
new Promise(r => {
setTimeout(() => {
// console.log("fetching page ", pageNumber);
if (pageNumber >= 5) {
return r({ results: "done" });
}
@camilleriluke
camilleriluke / plot.sh
Created September 4, 2018 14:41
example plot
#!/usr/local/bin/gnuplot --persist
# If you want to save on disk png โ€ฆ or set "export GNUTERM=x11" for X11 screen window
set terminal png
set output "result.plo.png"
set title "Benchmark1"
set size 1,0.7
set xlabel 'requests'
set ylabel 'ms'
# if you want to use autoscale use "set autoscale xy"
set xrange [0:100]
@camilleriluke
camilleriluke / durandal-router-events.js
Last active March 20, 2019 06:42
durandal router events
router.on('router:navigation:complete', e => {
console.log('๐Ÿž router:navigation:complete', e);
});
router.on('router:navigation:cancelled', e => {
console.log('๐Ÿž router:navigation:cancelled', e);
});
router.on('router:navigation:processing', e => {
console.log('๐Ÿž router:navigation:processing', e);
});
router.on('router:route:activating', e => {
@camilleriluke
camilleriluke / good-morning.js
Last active April 5, 2022 06:35
Good morning everyone ๐Ÿ’
#! /usr/bin/env node
var e = ['๐Ÿ’','๐Ÿฆ','๐Ÿฆง','๐Ÿถ','๐Ÿ•','๐Ÿฉ','๐Ÿบ','๐ŸฆŠ','๐Ÿฆ','๐Ÿฑ','๐Ÿˆ','๐Ÿˆโ€โฌ›','๐Ÿฆ','๐Ÿฏ','๐Ÿ…','๐Ÿ†','๐Ÿด','๐ŸŽ','๐Ÿฆ„','๐Ÿฆ“','๐ŸฆŒ','๐Ÿฆฌ','๐Ÿฎ','๐Ÿ‚','๐Ÿƒ','๐Ÿ„','๐Ÿท','๐Ÿ–','๐Ÿ—','๐Ÿ','๐Ÿ‘','๐Ÿ','๐Ÿช','๐Ÿซ','๐Ÿฆ™','๐Ÿฆ’','๐Ÿ˜','๐Ÿฆฃ','๐Ÿฆ','๐Ÿฆ›','๐Ÿญ','๐Ÿ','๐Ÿ€','๐Ÿน','๐Ÿฐ','๐Ÿ‡','๐Ÿฟ๏ธ','๐Ÿฆซ','๐Ÿฆ”','๐Ÿฆ‡','๐Ÿป','๐Ÿปโ€โ„๏ธ','๐Ÿจ','๐Ÿผ','๐Ÿฆฅ','๐Ÿฆฆ','๐Ÿฆจ','๐Ÿฆ˜','๐Ÿฆก','๐Ÿฆƒ','๐Ÿ”','๐Ÿ“','๐Ÿฃ','๐Ÿค','๐Ÿฅ','๐Ÿฆ','๐Ÿง','๐Ÿ•Š๏ธ','๐Ÿฆ…','๐Ÿฆ†','๐Ÿฆข','๐Ÿฆ‰','๐Ÿฆค','๐Ÿฆฉ','๐Ÿฆš','๐Ÿฆœ','๐Ÿธ','๐ŸŠ','๐Ÿข','๐ŸฆŽ','๐Ÿ','๐Ÿฒ','๐Ÿ‰','๐Ÿฆ•','๐Ÿฆ–','๐Ÿณ','๐Ÿ‹','๐Ÿฌ','๐Ÿฆญ','๐ŸŸ','๐Ÿ ','๐Ÿก','๐Ÿฆˆ','๐Ÿ™','๐Ÿš','๐Ÿชธ','๐ŸŒ','๐Ÿฆ‹','๐Ÿ›','๐Ÿœ','๐Ÿ','๐Ÿชฒ','๐Ÿž','๐Ÿฆ—','๐Ÿชณ','๐Ÿ•ท๏ธ','๐Ÿฆ‚','๐ŸฆŸ','๐Ÿชฐ','๐Ÿชฑ','๐Ÿฆ€','๐Ÿฆž','๐Ÿฆ','๐Ÿฆ‘']
console.log(`Good morning everyone ${e[Math.floor(Math.random()*e.length)]}`)
@camilleriluke
camilleriluke / repo-labels.sh
Last active September 3, 2020 19:11
Github repository labels standard
#!/usr/bin/env bash
# You can craete a token from https://github.com/settings/tokens and give the
# "repo" persmission to the token
AUTH_TOKEN=$1
OWNERREPO=$2
if [[ "$#" -ne 2 ]]; then
echo "Usage: $0 AUTH_TOKEN OWNER/REPO\n"
exit 1