Skip to content

Instantly share code, notes, and snippets.

View mbernson's full-sized avatar
👨‍💻
Coding...

Mathijs Bernson mbernson

👨‍💻
Coding...
View GitHub Profile
@Nizzle
Nizzle / shabadge.yaml
Last active December 12, 2024 09:22
ESPhome config for SHA2017 badge (https://wiki.sha2017.org/w/Projects:Badge)
esphome:
name: shabadge
esp32:
board: esp32-pro
logger:
wifi:
ssid: !secret wifi_ssid
@mbernson
mbernson / x
Last active December 5, 2024 09:53
X - Opens the Xcode workspace/project or Swift package in your current working directory using Xcode.
#!/usr/bin/env ruby
XCODE_PATH = File.expand_path(File.join(`xcode-select -p`.chomp, '../..'))
def open_cmd(pattern)
files = Dir.glob(pattern)
`open -a "#{XCODE_PATH}" "#{files.first}"` and exit if files.count == 1
end
open_cmd '*.xcworkspace'
@IsaacXen
IsaacXen / README.md
Last active April 12, 2025 01:49
(Almost) Every WWDC videos download links for aria2c.
Mindset: The New Psychology of Success - Carol Dweck
Test Driven Development: By Example - Kent Beck
Implementation Patterns - Kent Beck
Wim Crouwel in his own words (http://www.lauwenprojects.com/projects.asp?id=114)
Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability - Steve Krug
Badass: Making Users Awesome - Kathy Sierra
Thinking with Type: A Critical Guide for Designers, Writers, Editors, & Students - Ellen Lupton
The Vignelli Canon - Massimo Vignelli (http://www.vignelli.com/canon.pdf)
Stop Stealing Sheep & Find Out How Type Works - Erik Spiekermann, E.M Ginger
Mental Models - Indi Young
@remcoder
remcoder / nodemcu build script
Last active June 20, 2016 14:15
Fast, incremental Lua uploads for nodemcu
Fast, incremental Lua uploads for NodeMCU
INSTALLATION
1. This script requires nodemcu-uploader and gulp to be installed globally:
$ npm install -g gulp
$ npm install -g nodemcu-tool
$ pip install nodemcu-uploader
@cypres
cypres / Easter.swift
Last active March 27, 2021 17:08
Easter calculation in Swift
// Easter calculation in swift after Anonymous Gregorian algorithm
// Also known as Meeus/Jones/Butcher algorithm
import Foundation
func easter(Y : Int) -> NSDate {
let a = Y % 19
let b = Int(floor(Double(Y) / 100))
let c = Y % 100
let d = Int(floor(Double(b) / 4))
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 20, 2025 17:17
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@vasilisvg
vasilisvg / dabblet.css
Created April 24, 2013 09:00
A simple menu with a :hover action
/**
* A simple menu with a :hover action
*/
html {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
font: 100%/2.5 helvetica, arial;
}
@cliss
cliss / gist:5374387
Last active November 27, 2019 19:06
Best of Top Gear
+----------------------------------------------+
| Series | Episode | Description |
+--------+---------+---------------------------+
| 5 | 5 | Jaguar at the Nurburgring |
| 5 | 8 | Race to Verbier |
| 8 | 0 | Winter Olympics Special |
| 8 | 3 | Amphibious Cars |
| 8 | 6 | Caravan Vacation |
| 9 | 3 | America Special |
| 10 | 0 | Polar Special |
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs