Skip to content

Instantly share code, notes, and snippets.


Stephen Quick stepquick

View GitHub Profile
btroncone /
Last active Oct 27, 2020
A Comprehensive Introduction to @ngrx/store - Companion to Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

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

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

Table of Contents

mycodeschool / DoublyLinkedList.c
Created Nov 12, 2013
Doubly Linked List implementation in C
View DoublyLinkedList.c
/* Doubly Linked List implementation */
struct Node {
int data;
struct Node* next;
struct Node* prev;
fideloper /
Last active Sep 8, 2020
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
tar -xvjf curl-7.50.2.tar.bz2
acdlite / app.js
Last active Aug 18, 2020
Quick and dirty code splitting with React Router v4
View app.js
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
thepsion5 / EloquentFooRepository.php
Created May 2, 2014
Example implementation of a Eloquent-based repository that provides a fluent interface for sorting and pagination without exposing the underlying model API.
View EloquentFooRepository.php
class EloquenFooRepository
* The base eloquent model
* @var Eloquent
protected $model;
View docker-compose.yml
version: '2'
image: traefik
command: -c /dev/null --web --docker --docker.domain=docker.localhost --logLevel=DEBUG --entryPoints="Name:https Address::443 TLS:/certs/server.crt,/certs/server.key;/certs_br/server.crt,/certs_br/server.key" --entryPoints="Name:http Address::80 Redirect.EntryPoint:https"
- "80:80"
- "8080:8080"
taylorotwell /
Created Sep 23, 2015
Global Homestead Without Composer
alias homestead='function __homestead() { (cd ~/Documents/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead'
# Usage
homestead up
homestead halt
# etc...
ryanflorence / rails-ey.jsx
Last active Feb 2, 2018
Rail-ey style routes
View rails-ey.jsx
const lookup = (namespace) => {
// if you really want rails-style indirection, you'd
// need an app container that could look up modules
// by strings.
const Resources = ({ namespace }) => {
const Layout = lookup(namespace, 'layout')
return (
<Route path={`/${namespace}`} render={() => (
seyDoggy / SomeCtrl.js
Last active Sep 20, 2017
My version of the AngularJS ui-bootstrap alert service as derived from here: No $rootScopes were harmed in the making of this code.
View SomeCtrl.js
(function () {
'use strict';
.controller('SomeCtrl', SomeCtrl);
SomeCtrl.$inject = ['$scope', '$http', ' alertService'];
function SomeCtrl($scope, $http, alertService) {
$http.put('http://some.url/user/44', {
staltz / .bashrc
Created Mar 7, 2017
Show a macOS notification when a terminal task is done
View .bashrc
# Name it whatever you want. I like `y` because in my keyboard layout it's close to `;`
function y() {
if [ $previous -eq 0 ]; then
osascript -e "display notification \"Done\" with title \"Terminal Task\"" && say "it is done";
osascript -e "display notification \"Failed\" with title \"Terminal Task\"" && say "it went to the trees";
You can’t perform that action at this time.