Skip to content

Instantly share code, notes, and snippets.

View NguyenDa18's full-sized avatar
🎧
Listening to Funny Podcasts

Danh Nguyen NguyenDa18

🎧
Listening to Funny Podcasts
View GitHub Profile
@caprosset
caprosset / README.md
Last active August 30, 2023 00:39
Migrating your database from mLab (Heroku add-on) to Mongo Atlas

Migrating your database from mLab (Heroku add-on) to MongoDB Atlas

This is the message you should have received from Heroku in your mailbox some weeks/days ago:

[Shutdown Notice]: mLab MongoDB add-on Dear Heroku customer,

We have identified you as the owner of, or collaborator on, the following apps that have the mLab MongoDB add-on installed:

...list of projects...

@NguyenDa18
NguyenDa18 / GitHub-Forking.md
Last active October 19, 2018 18:41 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

From DigitalOcean:

https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github#create-a-copy-of-the-repository

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitH

/* *******************************************************************************************
* GLOBAL OBJECTS > ARRAY
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
* ******************************************************************************************* */
// Global object: properties
Array.length // Reflects the number of elements in an array
// Global object: methods
@chrislkeller
chrislkeller / senate_intelligence_commitee_members_2001_2018.csv
Last active January 2, 2024 23:06
A rundown of members of the U.S. Senate Intelligence Committee between 2001 and the current session though 2018. Data acquired from the Senate Intelligence Committee webpages. Includes member ID and link to bio page on ProPublica's Represent news app
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 10 columns, instead of 9. in line 5.
order_id,congress,years,senator,member_id,party,state,notes,source,pro_publica_represent
51,115th Congress,2017-2018,Angus King,K000383,Democrat,Maine,,https://www.intelligence.senate.gov/about/committee-members-115th-congress-2017-2018,https://projects.propublica.org/represent/members/K000383
71,114th Congress,2015-2016,Angus King,K000383,Democrat,Maine,,https://www.intelligence.senate.gov/about/committee-members-114th-congress-2015-2029,https://projects.propublica.org/represent/members/K000383
91,113th Congress,2013-2014,Angus King,K000383,Democrat,Maine,,https://www.intelligence.senate.gov/about/committee-members-113th-congress-2013-2014,https://projects.propublica.org/represent/members/K000383
17,107th Congress,2001-2002,Barbara A. Mikulski,M000702,Democrat,Maryland,,https://www.intelligence.senate.gov/about/committee-members-107th-congress-2001-2002,https://projects.propublica.org/represent/members/M000702
36,108th Congress,2003-2004,Barbara A. Mikulski,M000702,Democrat,Maryland,,https://www.intelligence
@vishwanath79
vishwanath79 / MacOS_Install_OpenCV.py
Last active May 9, 2019 17:35
Install OpenCV on Mac OS Sierra on Python 3.5
# 1. Download and install the latest Anaconda distribution from https://www.continuum.io/downloads#macos
# 2. Create a new Python environment. Make sure you choose python 3.5 as your python version for the virtual environment:
conda create -n myenv python=3.5
# 3. Activate the new environment using:
source activate myenv
@armaandhir
armaandhir / readExcel.py
Last active June 6, 2022 21:25
Reading data from excel using openpyxl
#
# I hate the documentation of openpyxl and it took me a while to undertand their stuff. So I decided to write down this code.
# Has some wrapper functions that reads all rows from the excel sheet and also a function to read a particular row.
# Add some code to the functions if you wish to do something on fly like adding values to list and sorting them later.
#
# Date: 28/09/2015
from openpyxl import load_workbook
# Reads all rows
@kelvintaywl
kelvintaywl / split.py
Last active May 9, 2024 11:39
Python Script to split CSV files into smaller files based on number of lines
import csv
import sys
import os
# example usage: python split.py example.csv 200
# above command would split the `example.csv` into smaller CSV files of 200 rows each (with header included)
# if example.csv has 401 rows for instance, this creates 3 files in same directory:
# - `example_1.csv` (row 1 - 200)
# - `example_2.csv` (row 201 - 400)
# - `example_3.csv` (row 401)
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@bricker
bricker / amznymous.md
Last active April 23, 2024 11:14
An Amazon Programmer's Perspective (http://pastebin.com/BjD84BQ3)

Originally posted at http://pastebin.com/BjD84BQ3

Trigger warning: mention of suicidal ideation

tl;dr: I burned out as a developer at Amazon at the end of my second year. I’ve since found a healthy and sustainable work-life balance and enjoy work again. I write this to A) raise awareness, especially for new-hires and their families, and B) help give hope and advice to people going through the same at Amazon or other companies.

Hello, world

There’s been no shortage of anecdotes, opinions, and rebuttals regarding Amazon’s corporate culture as of late. I write this not to capitalize on the latest news-feed fad, but to share what I had already written and promptly deleted. I didn’t think anyone would want to hear my story, but it’s apparent people are going through a similar experience and don’t have a voice.

I’m a Software Development Engineer II at Amazon; SDE II basically means a software developer with at least 2–3 years of industry experience. I started at Amazon as an SDE I.

@PurpleBooth
PurpleBooth / README-Template.md
Last active July 22, 2024 02:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites