Skip to content

Instantly share code, notes, and snippets.

@dalegaspi
dalegaspi / brew_symlink_error_sierra.md
Last active January 4, 2024 22:32
Homebrew Symlink errors in Mac OSX High Sierra
@sampsyo
sampsyo / fib.ts
Last active August 9, 2023 23:54
function inheritance in TypeScript
// This is a quick demonstration of "function inheritance" as described in
// this paper from Daniel Brown and William Cook.
// http://www.cs.utexas.edu/users/wcook/Drafts/2009/sblp09-memo-mixins.pdf
// Expressed in TypeScript (and without the monads).
// Syntax note: When you write function types in TypeScript, you need to name
// each parameter. But the names don't actually matter, so I just use _. You
// can read `(_:A) => B` as `a -> b` in ML or Haskell syntax.
// In Brown and Cook's Haskell, `type Gen a = a -> a` is a "generator." The
@msgodf
msgodf / kiczales-oopsla94-black-boxes-reuse.md
Last active March 28, 2022 22:23
Gregor Kiczales "Why are black boxes so hard to reuse?"

This talk was given by Gregor Kiczales of Xerox PARC at OOPSLA ’94, 10/26/94. © 1994, University Video Communications. A transcript, with point- and-click retrieval of the slides, is available at http:/www.xerox.com/PARC/spl/eca/oi/gregor-invite/gregor- transcript.html

Why are black boxes so hard to reuse?

I think our field will go through a revolution. We will fundamentally change the way we think about and use abstraction in the engineering of software.

The goal of this talk is to summarize the need for and the basic nature of this abstraction framework.

The change is not new problems or new systems, but a new way of thinking about existing problems and existing systems.

@sairion
sairion / Starting with Webpack.md
Last active August 29, 2015 14:18
Starting with Webpack.md

Webpack을 사용한 현대적 자바스크립트 개발 시작하기

Webpack은 @sokra(Tobias Koppers)와 컨트리뷰터들이 구현하고 있는 자바스크립트 기반의 모듈 번들러와 그를 받쳐주는 라이브러리(webpack/lib), 그리고 에코시스템(플러그인, 로더)들을 의미합니다.

스포카에서는 2014년 12월부터 React.js를 전면 도입하여 새 버젼의 적립 애플리케이션을 제작하고 있습니다. 이 개발 과정을 뒷받침해주고 있는 가장 중요한 도구를 말하라고 한다면 두말할 것도 없이 Webpack일 것입니다.

사실 Node.js나 파이썬 같은 환경에서 개발을 해본 사람들에게는 모듈이라는 개념이 익숙하지만, 웹 프론트엔드 개발자에게 모듈이라는 개념은 조금 낯설 수 있는 것이 사실입니다. require.js와 같은 AMD 시스템 또는 Browserify같은 도구를 이용해 본 경험이 없다면 말이죠.

모듈이라는 것은 굉장히 중요합니다. 모듈 시스템을 갖춘 환경에서 일해본 사람은 어떤 이유에서든 그 중요성에 모두 공감할 것입니다. 하지만 웹에는 표준적인 개념의 모듈이라는 것이 없었습니다 (사실 아직도 제대로 된 것은 딱히 없습니다만). 그렇기 때문에 자바스크립트 모듈을 사용하기 위해서는 모듈을 다룰 수 있는 시스템 (RequireJS, CommonJS 등)이 필요하고, 모듈들의 내용과 export들을 이해하고 원하는 형태로 변형할 수 있는 도구가 필요합니다. Webpack과 Browserify는 이런 것을

@vsouza
vsouza / .bashrc
Last active April 9, 2024 05:27
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@pmdarrow
pmdarrow / iterm-launcher.js
Last active September 14, 2017 20:52
Launch iTerm 2 with a predefined tab & split configuration using Apple's "Javascript for Automation"
/**
* AppleScript to launch iterm2 terminals/tabs with configurable:
* ~ Name <name>
* ~ List of commands <cmds>
* ~ Split behavior horizontal(h) or vertical(v) <split> :: (h, v)
*
* Run from terminal with `osascript iterm-launcher.js`.
* Don't unfocus with the mouse/keyboard while executing the script.
*
* JS port of https://github.com/luismartingil/scripts/blob/master/iterm_launcher02.applescript
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@branneman
branneman / better-nodejs-require-paths.md
Last active April 25, 2024 13:21
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@hubgit
hubgit / README.md
Last active December 16, 2023 14:09
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@smallvil
smallvil / ssl.conf
Created July 6, 2013 15:28
startssl for nginx configuration file
# HTTPS server
#
# 2013-07-07 secure.get9.net
# cat get9.net.crt sub.class1.server.ca.pem ca.pem > get9.net-nginx.crt
server {
listen 443;
server_name secure.get9.net;