Skip to content

Instantly share code, notes, and snippets.

View andrcmdr's full-sized avatar
:octocat:
=(^",..,"^)= 🐧 🦀

Andrew Bednoff andrcmdr

:octocat:
=(^",..,"^)= 🐧 🦀
View GitHub Profile
@andrcmdr
andrcmdr / programming-languages.csv
Created November 25, 2017 06:47 — forked from turicas/programming-languages.csv
Download list of programming languages from Wikipedia
name wikipedia_url
A# .NET https://en.wikipedia.org/wiki/A_Sharp_(.NET)
A# (Axiom) https://en.wikipedia.org/wiki/A_Sharp_(Axiom)
A-0 System https://en.wikipedia.org/wiki/A-0_System
A+ https://en.wikipedia.org/wiki/A%2B_(programming_language)
A++ https://en.wikipedia.org/wiki/A%2B%2B
ABAP https://en.wikipedia.org/wiki/ABAP
ABC https://en.wikipedia.org/wiki/ABC_(programming_language)
ABC ALGOL https://en.wikipedia.org/wiki/ABC_ALGOL
ABSET https://en.wikipedia.org/wiki/ABSET
@andrcmdr
andrcmdr / bytebite.py.sh
Last active October 1, 2017 08:59
Binary/octal/hexadecimal/decimal encode/decode/format lambda functions
#!/bin/bash
###!/usr/bin/python3
#Encode
#Binary [b]
python3 << code
print((lambda s,b: format(int(bytearray(s, "ascii").hex(), 16), b))("Hello friend!", "b"))
code
@andrcmdr
andrcmdr / latency.markdown
Created July 22, 2017 03:29 — forked from hellerbarde/latency.markdown
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

@andrcmdr
andrcmdr / gnome-tracker-disable.md
Last active December 4, 2017 23:00 — forked from vancluever/gnome-tracker-disable.md
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@andrcmdr
andrcmdr / λcube.md
Last active July 25, 2022 01:59 — forked from brendanzab/λcube.md
Lambda λ Cube (by Hendrik 'Henk' Pieter Barendregt)

System λ

The untyped Lambda Calculus

e ::=             terms:
  x               variable
  e e             application
  λ x . e         abstraction
@andrcmdr
andrcmdr / latency.txt
Created April 20, 2017 04:12 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@andrcmdr
andrcmdr / TrueColour.md
Created March 16, 2017 09:55 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"

Advanced Functional Programming with Scala - Notes

Copyright © 2017 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@andrcmdr
andrcmdr / rotate_desktop.sh
Last active September 16, 2015 09:41 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation