Skip to content

Instantly share code, notes, and snippets.

View cggaurav's full-sized avatar
🏠
Working from home

Gaurav cggaurav

🏠
Working from home
View GitHub Profile
@grimen
grimen / streams-test.js
Last active January 23, 2019 09:41
Experiments with Node.js Stream API.
/* =============================================
Dependencies
------------------------------------------ */
const debug = require('debug')
const chalk = require('chalk')
const { Readable, Writable, Transform, pipeline } = require('stream')
@twolfson
twolfson / README.md
Last active December 2, 2018 07:05
Internal monitoring evaluation / research
@vasanthk
vasanthk / System Design.md
Last active April 19, 2024 15:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@dfrankland
dfrankland / bootstrap-v4-alpha-responsive-text-align.css
Last active April 3, 2018 03:51
Responsive text-align classes for Bootstrap v4-alpha http://v4-alpha.getbootstrap.com/
/* Responsive Text Align */
/* Text Align Up */
@media (min-width: 34em) {
.text-center-sm-up {
text-align: center;
}
.text-right-sm-up {
text-align: right;
}
@simpsoka
simpsoka / philosophy.md
Last active February 9, 2023 19:57
simpsoka product philosophy

Product managers

  • Seek out failure, it teaches us to think like a scientist. If you start with a hypothesis, then try to prove yourself wrong, you’re bound to make much better decisions. You have to be willing to fail, and that in itself is going to help you build confidence and be more convicted about what your strategy is in the end.
  • There are hundreds of methods for building products and running teams. As a quality PM, it's important to have an open mind about all of it, but finding your own process and philosophy can be grounding. It helps you find your pillars so that you don't smash into things while you're building. Remember, however, that you can always find a budget for remodeling. 😉
  • The beauty of a good process is when it just becomes how you do your work. When you forget you're following a process at all is when you know the process is working for you, your team, your company, and your customers.
  • The advice I give new Product Managers or PMs coming onto a team for the first
@technobly
technobly / SparkCoreWS2801.cpp
Last active April 29, 2018 21:57
SPARK CORE Adafruit_WS2801 LIBRARY & EXAMPLE
//-----------------------------------------------//
// SPARK CORE Adafruit_WS2801 LIBRARY & EXAMPLE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
// Read comments in APPLICATION.CPP section for //
// Hookup details! //
//-----------------------------------------------//
// Technobly / BDub - Jan 9th, 2014 //
//===============================================//
@christianberg
christianberg / bootstrap.sh
Last active April 1, 2016 12:20
Script to install Docker on a Ubuntu 13.04 host
#/bin/bash
set -e
echo "=== Activating Firewall (only SSH allowed) ==="
ufw allow ssh
ufw --force enable
if [ ! -f /swapfile ]; then
echo "=== Activating swap ==="
fallocate -l 1G /swapfile
@grimen
grimen / .bowerrc
Last active December 19, 2015 10:39
HTML5/S3/Grunt/Make/Pow project setup.
{
"directory": "app/components"
}
@possibilities
possibilities / meteor-async.md
Created August 23, 2012 22:53
Meteor Async Guide

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:

@cggaurav
cggaurav / index.html
Created March 21, 2012 15:07 — forked from mbostock/README.md
Interactive Tree (D3)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Node-Link Tree</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?1.25.0"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?1.25.0"></script>
<style type="text/css">
circle.node {