Skip to content

Instantly share code, notes, and snippets.

View montogeek's full-sized avatar

Fernando Montoya montogeek

View GitHub Profile
@vsetka
vsetka / summarize_github_stats.js
Last active November 20, 2017 14:09
Summarizes repo language stats for top 100 (by star count) user owned repos to get a "feel" for user language preference/experience. Replace GITHUB_USERNAME with a user you want to summarize and YOUR_GITHUB_API_TOKEN with the access token (https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/)
"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 = "";
@TheLarkInn
TheLarkInn / grouce-webpack-all-orgs-all-repos.bash
Last active January 4, 2020 06:57
This bash script creates a gource video. Requires gource and libav (can install with brew).
#!/bin/bash
ARRAY=(
"webpack:webpack"
"webpack:example-app"
"webpack:enhanced-require"
"webpack:webpack-dev-middleware"
"webpack:enhanced-resolve"
"webpack:template"
"webpack:webpack-dev-server"
@juanarbol
juanarbol / chmodCheatSheet.md
Last active January 15, 2025 09:15
Chmod cheat sheet

Chmod codes cheat sheet

How to use chmod codes in UNIX:

  1. There are three types of permissions in files and folders in unix
    1. Read (r)
    2. Write (w)
    3. Execute (x)
  2. And, there is a classification of users called UGO (explained bellow):
  3. U ~> User (usually, you)
@kdzwinel
kdzwinel / scroll_to.js
Created May 2, 2017 10:24
Scroll to element or scroll by value
let rafId;
function scrollToElement(el, offsetTop = 0) {
scrollByValue(el.getBoundingClientRect().top - offsetTop);
}
function scrollByValue(offsetTop = 0) {
if (offsetTop !== 0) {
if (rafId) {
cancelAnimationFrame(rafId);
@iamstarkov
iamstarkov / code.js
Last active October 5, 2017 22:30 — forked from montogeek/code.js
// 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
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 15, 2025 22:49
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

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.


Effective Engineer - Notes

What's an Effective Engineer?