Skip to content

Instantly share code, notes, and snippets.

@mdsaleemj
mdsaleemj / Software-Development-Principles.md
Last active February 25, 2017 17:55
Software Development Priniciples

The purpose of this gist is to know more about the software developing principles in general. This intention is to explore and know more about software development from industry leaders like Martin Flowers, Robrt Martin(aka UncleBob ) and many .

In addition to that , learning and practising programming and desing skill with emphasis on necessary programming styles like OOP and FP needs to be encouraged.
This guide is started as rough draft and will serve to contain information about resources , leaders to follow, topics under software development.

##Software Development

@asciidisco
asciidisco / nha.md
Last active October 20, 2017 20:06
Node homeautomation
@sebmarkbage
sebmarkbage / JSXSpreadAttributes.md
Last active August 13, 2020 15:18
JSX Spread Attributes

JSX Spread Attributes

If you know all the properties that you want to place on a component a head of time, it is easy to use JSX:

  var component = <Component foo={x} bar={y} />;

Mutating Props is Bad, mkay

@Mirabis
Mirabis / docker-compose.yml
Created April 24, 2016 10:55
Docker-Compose Example
version: "2"
services:
openvpn:
image: dperson/openvpn-client:latest
command: -f
restart: always
dns: 10.0.0.2
cap_add:
- NET_ADMIN
devices:
@codediodeio
codediodeio / longest-substring.js
Created September 4, 2017 23:13
Longest Substring JavaScript - LeetCode Solution
// Given a string, find the length of the longest substring without repeating characters.
// Examples:
// Given "abcabcbb", the answer is "abc", which the length is 3.
// Given "bbbbb", the answer is "b", with the length of 1.
// Given "pwwkew", the answer is "wke", with the length of 3. Note that the answer must be a substring, "pwke" is a subsequence and not a substring.
# remap C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# reload the conf file on the fly
bind r source-file ~/.tmux.conf
# who knows what this does, but I can now scroll in a tmux pane
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
@vrachieru
vrachieru / merge-overlapping-intervals.js
Created October 5, 2014 21:26
Merge overlapping intervals
/* Merge overlapping intervals
*
* Example:
* [[1,4],[3,5],[2,4],[7,10]] -> [[1,5],[7,10]]
*/
function mergeIntervals(intervals) {
// test if there are at least 2 intervals
if(intervals.length <= 1)
return intervals;
@torgeir
torgeir / prototypes.js
Created November 29, 2011 09:17
javascript's __proto__ and prototype explained
/**
* __proto__ and prototype
* - the __proto__ property the instance's 'parent' up the prototype chain
* - the prototype property refers what new instances of the type will have their __proto__ set to, i.e. what will be the new instance's 'parent' up the prototype chain
*/
/* Given */
function Object () {}
Object.prototype = {
__proto__: null
@primaryobjects
primaryobjects / substring.js
Last active March 8, 2023 23:39
Longest Substring Without Repeating Characters in javascript.
/**
* @param {string} s
* @return {number}
*/
var lengthOfLongestSubstring = function(s) {
var max = 0;
var str = '';
var i = 0;
var cache = [];
@dwayne
dwayne / 01-intro.md
Last active June 27, 2023 02:42
My notes from the book "ng-book: The Complete Book on AngularJS by Ari Lerner".

Introduction

Author: Ari Lerner.

AngularJS offers a single framework that can be used to build dynamic, client-centric applications. It provides:

  • Module support
  • DOM manipulation
  • Animations
  • Templating