Skip to content

Instantly share code, notes, and snippets.

View berkus's full-sized avatar
🎯
Practice your desensitization exercises to remain unfazed by enemy atrocities

Berkus Decker berkus

🎯
Practice your desensitization exercises to remain unfazed by enemy atrocities
View GitHub Profile
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 16, 2025 04:00
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@msehnout
msehnout / main.rs
Last active November 2, 2017 13:45
C++17 Coding Challenge in Rust
/*
* # C++17 Coding challenge in Rust
* How to deal with edge cases:
* * if the input file is empty, the program should write “input file missing” to the console.
* * if the input file does not contain the specified column, the program should write “column name doesn’t exists in the input file” to the console.
*
* The rest was not considered and mercilessly unwrapped.
*/
use std::env;
@steveklabnik
steveklabnik / main.rs
Created October 25, 2017 16:06
The Results of the Expressive C++17 Coding Challenge in Rust
use std::env;
use std::io;
use std::io::prelude::*;
use std::fs::File;
#[derive(Debug)]
enum Error {
Io(io::Error),
Program(&'static str),
}
anonymous
anonymous / playground.rs
Created September 25, 2017 12:24
Rust code shared from the playground
//[dependencies]
//time = "0.1"
//futures = "0.1.14"
//tokio-core = "0.1"
//tokio-periodic = "0.1"
#[macro_use]
extern crate tokio_core;
extern crate time;
@gravitylow
gravitylow / codesign_gdb.md
Last active March 10, 2025 16:38 — forked from hlissner/codesign_gdb.md
Codesign gdb on macOS

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
@andywer
andywer / talk-proposal.md
Last active December 23, 2020 17:22
Reactive Conf 2017 ⚡️ Talk Proposal - Memory Leak Hunt 2017 Style

This is a proposal for lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal!

Memory Leak Testing in 2017

Hi, I am Andy, creator of leakage - the node-powered memory leak testing library.

Instead of manual debugging it provides a structured approach to fix or even prevent memory leaks.

@mojavelinux
mojavelinux / jekyll-asciidoctor-diagram.adoc
Last active November 26, 2022 13:06
How to configure Asciidoctor Diagram in a Jekyll site

How to configure Asciidoctor Diagram in a Jekyll site

Generate site

$ cd /tmp
$ mkdir jekyll-site-creator
@DarinM223
DarinM223 / rustfmt.toml
Created May 3, 2017 04:24
A saner rustfmt configuration file
array_layout = "Visual"
chain_indent = "Block"
array_width = 80
chain_one_line_max = 80
comment_width = 80
condense_wildcard_suffices = false
closure_block_indent_threshold = 2
control_brace_style = "AlwaysSameLine"
disable_all_formatting = false
error_on_line_overflow = true
@dinfuehr
dinfuehr / aarch64-logical-immediates.txt
Last active October 23, 2024 03:56
all possible logical immediates
5555555555555555 0101010101010101010101010101010101010101010101010101010101010101 size=02 length=00 rotation=00 N=0 immr=000000 imms=111100
aaaaaaaaaaaaaaaa 1010101010101010101010101010101010101010101010101010101010101010 size=02 length=00 rotation=01 N=0 immr=000001 imms=111100
1111111111111111 0001000100010001000100010001000100010001000100010001000100010001 size=04 length=00 rotation=00 N=0 immr=000000 imms=111000
8888888888888888 1000100010001000100010001000100010001000100010001000100010001000 size=04 length=00 rotation=01 N=0 immr=000001 imms=111000
4444444444444444 0100010001000100010001000100010001000100010001000100010001000100 size=04 length=00 rotation=02 N=0 immr=000010 imms=111000
2222222222222222 0010001000100010001000100010001000100010001000100010001000100010 size=04 length=00 rotation=03 N=0 immr=000011 imms=111000
3333333333333333 0011001100110011001100110011001100110011001100110011001100110011 size=04 length=01 rotation=00 N=0 immr=000000 imms=111001
9999999999999999 100110011001100110011001100