Skip to content

Instantly share code, notes, and snippets.

❤️
Love & Peace

Alan Dong ldong

❤️
Love & Peace
Block or report user

Report or block ldong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View vimrc_2018
" ==============================================================================
" Author: Alan Dong
" Version: 0.3.5
" Last Modified Date: 8/17/2018
" Description: My Vim Configuration file
" ==============================================================================
" set shell for bash as default
set shell=/bin/bash
View zshrc.txt
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@ldong
ldong / cidr.py
Created Apr 5, 2018 — forked from matts80/cidr.py
Python script to calculate CIDR values
View cidr.py
""" Calculate the subnet mask, its binary representation, number of host and
network bits, and the total number of hosts for a given CIDR address.
Usage: python cidr.py [cidr]
Notes: Pipe the command to jq to pretty print the JSON. Python 2 or 3 compatible.
Examples:
python cidr.py 10.0.0.0/24
python cidr.py 172.0.0.0/16 | jq
"""
from __future__ import print_function
@ldong
ldong / README.md
Created Mar 29, 2018 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

OP: @leonardofed founder @ plainflow.


View zip-excluding-specific-directories-and-files.md

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*
View Alphabets.txt
Apple
Boy
Cat
Dog
Egg Elephant
Friend Fish
Girl
Hi Hat
India Ice Cream
Judy
View Ember_Expand_Properties_Benchmark_RESULTS.md

$ node index.js
status quo x 183,314 ops/sec ±7.01% (81 runs sampled)
comma fix x 88,004 ops/sec ±5.18% (81 runs sampled)
alternate fix x 88,608 ops/sec ±4.89% (84 runs sampled)
regex match fix x 36,670 ops/sec ±5.04% (83 runs sampled)
iteration fix x 175,519 ops/sec ±5.20% (84 runs sampled)
nested x 88,474 ops/sec ±3.91% (82 runs sampled)

View rotate-matrix.java.md
/*
void rotate(int **a, int n) {
  if(!a || n<2)
      return;
  int mid = n/2;

  for(int i=0; i<mid; ++i) {
    int len = n-1-i;
    for(int j=i; j<len; ++j) {    
View Number-Of-Islands.java.md
import java.io.*;
import java.util.*;

/*
 * To execute Java, please define "static void main" on a class
 * named Solution.
 *
 * If you need more classes, simply define them inline.
 */
You can’t perform that action at this time.