Skip to content

Instantly share code, notes, and snippets.

View darokel's full-sized avatar

David Kewal darokel

  • TimeZest Inc
  • UK
View GitHub Profile
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing
@hopsoft
hopsoft / db.rake
Last active May 4, 2025 19:48
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 12, 2025 16:46
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@voter101
voter101 / Gulpfile.js
Last active October 16, 2024 17:37
Gulpfile for Rails application with replaced Sprockets with Gulp
'use strict'
var gulp, sass, babelify, browserify, watchify, source, util;
gulp = require('gulp');
sass = require('gulp-sass');
babelify = require('babelify')
browserify = require('browserify');
watchify = require('watchify');
source = require('vinyl-source-stream');
@cloudbring
cloudbring / README.md
Last active May 1, 2017 02:42
Building an Phoenix / Elixir Web App in June 2015
@garthk
garthk / profile
Created June 21, 2015 23:51
boot2docker 1.7.0 cert fix
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
@tomas-stefano
tomas-stefano / install_deis.sh
Last active October 28, 2016 02:41
Simple script to install Deis locally with vagrant
# All this commands are listed on the docs
# I just put everything together.
git clone https://github.com/deis/deis.git
cd deis/
git checkout v1.7.3
# make sure you have access to https://discovery.etcd.io/
make discovery-url
# After running the command above, make sure that you have
@maxivak
maxivak / 00.md
Last active April 8, 2025 18:31
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@JoeCianflone
JoeCianflone / fonts.scss
Created December 11, 2015 17:15
PX to Unitless line-height conversion and font fallbacks
// I hate converting units so here's how to do
// px to rem conversion with a fallback to px
// for older browsers...
/**
* Resize font from one type to another
* @param {[type]} $fontSize the font size that you want
* @param {[type]} $toUnit: rem the unit you want to convert to
* @param {[type]} $fromUnitSpecific: px default unit we're going to convert from (if you don't set it)
*
@btroncone
btroncone / ngrxintro.md
Last active May 18, 2025 04:12
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