Skip to content

Instantly share code, notes, and snippets.

View nimitmaru's full-sized avatar

Nimit Maru nimitmaru

View GitHub Profile
#!/bin/bash
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U user_name -d db_name latest.dump
@nimitmaru
nimitmaru / min_coins.rb
Last active December 30, 2015 09:28
Get the minimum number of coins for a given amount of change
$memory = {}
$recursive_count = 0
def get_change(coin_amounts, cents_to_change)
# memoization to make this faster
return $memory[cents_to_change] if not $memory[cents_to_change].nil?
# initalize min_coins to a very large number
min_coins = 999999999999999
@nimitmaru
nimitmaru / -
Created February 6, 2014 16:27
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "3.4.8",
"swig": "~1.3.2",
@nimitmaru
nimitmaru / -
Created February 6, 2014 16:27
{
"name": "application-name",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app.js"
},
"dependencies": {
"express": "3.4.8",
"swig": "~1.3.2",
@nimitmaru
nimitmaru / -
Created February 12, 2014 20:26
@import "normalize";
@import "modern-business";
body {
padding-top: 60px;
}
@mixin clearfix() {
&:after {
content:" ";
display: table;
@nimitmaru
nimitmaru / -
Created February 12, 2014 20:58
@import "normalize";
@import "modern-business";
body {
padding-top: 60px;
}
@mixin clearfix() {
&:after {
content:" ";
display: table;
@nimitmaru
nimitmaru / -
Created February 14, 2014 17:18
lib-cov
lcov.info
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
// TextOlympics - Driver File
// Road to Code - Fullstack Academy
//
// This is the file you have to edit
var my_channel = "nimits_channel"; //select your channel name. must be one word (no spaces).
var sendQuestion = function () {
var question_text = $('#question_text').val();
var phone_numbers = $('#phone_numbers_input').val();
// TextOlympics - Driver File
// Road to Code - Fullstack Academy
//
// This is the file you have to edit
var my_channel = "nimits_channel"; //select your channel name. must be one word (no spaces).
var all_phone_numbers = "";
var sendQuestion = function () {
var question_text = $('#question_text').val();
// TextOlympics - Driver File
// Road to Code - Fullstack Academy
//
// This is the file you have to edit
var my_channel = "nimits_channel"; //select your channel name. must be one word (no spaces).
var all_phone_numbers = "";
var sendQuestion = function () {
var question_text = $('#question_text').val();