Skip to content

Instantly share code, notes, and snippets.

View pxlpnk's full-sized avatar
💭
👋 hey

Andreas Tiefenthaler pxlpnk

💭
👋 hey
View GitHub Profile
@stettix
stettix / things-i-believe.md
Last active November 15, 2024 20:06
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@garethr
garethr / kubernetes.rego
Last active September 30, 2024 22:38
Collecting together Kubernetes rego examples, including porting the https://kubesec.io rules to rego
package kubernetes
name = input.metadata.name
kind = input.kind
is_service {
kind = "Service"
}
@miguelmota
miguelmota / _headers
Last active October 24, 2022 09:05
Netlify security headers (securityheaders.io)
/*
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Feature-Policy: geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; fullscreen 'none'; payment 'none'
Content-Security-Policy: default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline'
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

I think you mean team...
I think you mean squad..
I think you mean gang...
I think you mean pals...
I think you mean buds...
I think you mean posse...
I think you mean phalanx...
I think you mean crew...
I think you mean crüe...
I think you mean nerds...
;original
(filter filter-fn some-collection)
;parallel filter
(map :val (filter (fn [m] (:allowed-by-filter m))
(pmap (fn [v] {:val s :allowed-by-filter (filter-fn v)}) some-collection)))
@yorickpeterse
yorickpeterse / 0001-Added-a-simple-Maybe-monad.patch
Created March 12, 2015 10:20
Simple Maybe monad in Ruby (copied straight from Git, too lazy to gemify for now)
From a31eb2863043937881e51cffb544ef9a641a62af Mon Sep 17 00:00:00 2001
From: Yorick Peterse <SNIP>
Date: Thu, 12 Mar 2015 11:08:46 +0100
Subject: [PATCH] Added a simple Maybe monad.
This is a rather simple implementation of the Maybe monad [1] / Option type [2].
It only provides the absolute bare-minimum instead of providing a fully blown
functional programming library.
Using this class allows you to turn code such as this:
@tomasos
tomasos / presentation.clj
Created March 11, 2015 11:16
Overtone presentation
;; Tomas Osland
;; [email protected]
;; @tomasosland
;; Welcome to this presentation about functional music. In this lightning talk we
;; will construct a drum machine and make som beats, play the piano, and experiment with synthesizers.
;; Start overtone.cid
(ns overtone.examples.timing.one-bar-sequencer
@ungoldman
ungoldman / curl_post_json.md
Last active October 27, 2024 00:49
post a JSON file with curl

How do you POST a JSON file with curl??

You can post a json file with curl like so:

curl -X POST -H "Content-Type: application/json" -d @FILENAME DESTINATION

so for example:

@glv
glv / trouble-free-bundler.md
Last active March 16, 2018 14:50
This is a thing I wrote over a year ago for the internal LivingSocial wiki. There's nothing LS-specific about it, and it seems generally useful, so …

Trouble-Free Bundler

Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.