- There are three types of permissions in files and folders in unix
- Read (r)
- Write (w)
- Execute (x)
- And, there is a classification of users called UGO (explained bellow):
- U ~> User (usually, you)
| "use strict"; | |
| const https = require("https"); | |
| const API_TOKEN = "YOUR_GITHUB_API_TOKEN"; | |
| const GITHUB_USER = "GITHUB_USERNAME"; | |
| const request = (options, postBody) => { | |
| return new Promise((resolve, reject) => { | |
| const req = https.request(options, res => { | |
| let body = ""; |
| #!/bin/bash | |
| ARRAY=( | |
| "webpack:webpack" | |
| "webpack:example-app" | |
| "webpack:enhanced-require" | |
| "webpack:webpack-dev-middleware" | |
| "webpack:enhanced-resolve" | |
| "webpack:template" | |
| "webpack:webpack-dev-server" |
| let rafId; | |
| function scrollToElement(el, offsetTop = 0) { | |
| scrollByValue(el.getBoundingClientRect().top - offsetTop); | |
| } | |
| function scrollByValue(offsetTop = 0) { | |
| if (offsetTop !== 0) { | |
| if (rafId) { | |
| cancelAnimationFrame(rafId); |
| // some fp boilerplate | |
| const map = fn => xs => xs.map(fn); | |
| const reduce = (fn, init) => xs => xs.reduce(fn, init); | |
| const concat = (a, b) => a.concat(b); | |
| /* or in a library */ | |
| const R = require('ramda'); | |
| // async helpers | |
| const toPromise = x => Promise.resolve(x); |
| function t(strings, ...values) { | |
| const string = strings.reduce((s, next, i) => `${s}%{${i}}${next}`); | |
| return new IntlMessageFormat(string, 'en-us').format(values); | |
| } | |
| const person = 'Mike'; | |
| const age = 28; | |
| console.log(t`${person} is age ${age}`); |
| weeks = 30 | |
| weeks.times do |i| | |
| week = weeks - i | |
| puts `git log --oneline --since #{week}.weeks --before #{week-1}.weeks --pretty=format:"%aN" | sort | uniq | wc -l` | |
| end |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
| import React from 'react' | |
| import Router from 'react-router/BrowserRouter' | |
| import Match from 'react-router/Match' | |
| import Link from 'react-router/Link' | |
| import Redirect from 'react-router/Redirect' | |
| function elementInViewport(el) { | |
| var top = el.offsetTop | |
| var left = el.offsetLeft | |
| var width = el.offsetWidth |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/