Skip to content

Instantly share code, notes, and snippets.

View Adzz's full-sized avatar

Adam Lancaster Adzz

View GitHub Profile
@weavenet
weavenet / storing_sensitive_environment_variables.md
Last active August 5, 2017 13:05
Storing sensitive environment variables

I keep my dot files public, I of course don't want to have my credentials stored in those dotfiles.

To call applications which require credentials to be set as env vars I have the following setup.

Create a file called ~/.run_with_creds with all the secret credentials after an env statement which then calls the input parameters:

env TRELLO_DEVELOPER_PUBLIC_KEY=xxx \
    TRELLO_MEMBER_TOKEN=yyy \
 AWS_ACCESS_KEY_ID=987 \
@r00k
r00k / a1.md
Last active April 5, 2016 19:49
Quizzy Question 2

Answer to Question 1

That code violates Tell, Don't Ask..

You could also say it exhibits the feature envy smell.

(Violating Tell, Don't Ask and having feature envy are pretty much two sides of the same coin.)

@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.

@cb372
cb372 / jargon.md
Last active May 14, 2024 03:45
Category theory jargon cheat sheet

Category theory jargon cheat sheet

A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)

I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.

Functor

A functor is something that supports map.

@eiri
eiri / README.md
Created August 27, 2015 12:35
Demonstrate Erlang's 'busy wait' effect on CPU utilization

Demonstrate Erlang's 'busy wait' effect on CPU utilization

How?

Just make Erlang to do some light-load task in a bunch of relatively short leaving processes. Calculating PI to 80th digit in batches per 10 procs with short, 8 ms, sleep in-between, to give schedulers a breath space, will do.

Running

Run erl with 8 schedulers and no busy waiting on schedulers at all.

@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active December 29, 2024 07:04
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to:

@crushbowl
crushbowl / NYC-iOS-Companies_Job_board.md
Last active December 10, 2018 03:02
A list of iOS-related positions at companies in the NYC area (Manhattan, Brooklyn, NJ)

Looking for a mentor in iOS?- try this post: http://stephaniehurlburt.com/blog/2016/11/14/list-of-engineers-willing-to-mentor-you

General Job Boards

@jbweston
jbweston / rng.py
Last active April 25, 2016 21:10
import random
from itertools import accumulate
# random number generator that will not generate the same sequence
# of pseudorandom numbers if the `random` module is used elsewhere.
# the advantage is a 60x speedup
class Rng:
def __init__(self, outputs, probabilities, seed=0):
# test inputs for consistency
if len(outputs) != len(probabilities):

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.