Skip to content

Instantly share code, notes, and snippets.

View cauli's full-sized avatar
🏳️

Cauli Ziani cauli

🏳️
View GitHub Profile
@jhaddix
jhaddix / all.txt
Last active July 2, 2024 22:01
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links
@YellowAfterlife
YellowAfterlife / trifill.hx
Created July 27, 2015 22:16
An attempt of porting a triangle rasterizer (http://forum.devmaster.net/t/advanced-rasterization/6145) to pico-8
static function trifill(x1:Fixed, y1:Fixed, x2:Fixed, y2:Fixed, x3:Fixed, y3:Fixed) {
var dx12 = x1 - x2;
var dx23 = x2 - x3;
var dx31 = x3 - x1;
//
var dy12 = y1 - y2;
var dy23 = y2 - y3;
var dy31 = y3 - y1;
//
var minx = min(x1, min(x2, x3));
@PBrockmann
PBrockmann / README.md
Last active November 3, 2021 21:17
CollapsibleTree Search
@benvium
benvium / retrofit-custom-error-handling.java
Created August 29, 2014 19:45
Fairly simply Retrofit custom error handling example. Is set up so that you don't need to do much work in the 'failure' handler of a retrofit call to get the user-visible error message to show. Works on all endpoints. There's lots of exception handling as our server folks like to keep us on our toes by sending all kinds of random stuff..!
// on error the server sends JSON
/*
{ "error": { "data": { "message":"A thing went wrong" } } }
*/
// create model classes..
public class ErrorResponse {
Error error;
@staltz
staltz / introrx.md
Last active July 8, 2024 15:46
The introduction to Reactive Programming you've been missing
@manjeshpv
manjeshpv / passport.js
Last active February 29, 2024 15:11
Passport.js using MySQL for Authentication with Express
// config/passport.js
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
@ebaker355
ebaker355 / LocalizeStringsFromAndroid.rb
Created July 31, 2012 14:41
Translate Android strings.xml files to iOS Localizable.strings files
#!/usr/bin/env ruby
# gist: https://gist.github.com/3217498
# This script can be called from an Xcode 'Run Script' build phase at the
# beginning of the build process, like this:
#
# ${PROJECT_DIR}/LocalizeStringsFromAndroid.rb ${PROJECT_NAME}
#
# This script should be placed in the same directory as your .xcodeproj
@jboner
jboner / latency.txt
Last active July 8, 2024 21:47
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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