Skip to content

Instantly share code, notes, and snippets.

View miguelff's full-sized avatar

Miguel Fernández miguelff

View GitHub Profile
@miguelff
miguelff / benchmarks.out
Last active February 6, 2016 17:31
Fibo.rb
user system total real
Iterative (10) 0.000000 0.000000 0.000000 ( 0.000006)
Formula (10) 0.010000 0.000000 0.010000 ( 0.010514)
Recursive (10) 0.000000 0.000000 0.000000 ( 0.000004)
Iterative (20) 0.000000 0.000000 0.000000 ( 0.000004)
Formula (20) 0.040000 0.000000 0.040000 ( 0.043513)
Recursive (20) 0.000000 0.000000 0.000000 ( 0.000010)
Iterative (100) 0.010000 0.000000 0.010000 ( 0.000048)
Formula (100) 1.130000 0.010000 1.140000 ( 1.141393)
Recursive (100) 0.000000 0.000000 0.000000 ( 0.000034)
## Platform-data tooling
This document describes the set of tools and processes used by @github/platform-data to satisfy their operational needs, and accomplish their [goals](https://github.com/github/platform-data#our-goals-and-values) in an effective and efficient way.
#### Operational needs (goals alignment)
What we do defines our needs. Our main goal is to make sure GitHub is resilient and keeps being fast even if there is "a million of them", to do it, we carry on the following activities:
* **Modelling**: Given a new feature, design and implement data models and access patterns that are both fast and scalable.
* **Reviewing:** Given a proposed PR, advise and provide alternatives on maintainability or performance improvements.

Tips about drawing digitally

I asked on https://www.facebook.com/groups/1014974001864957/permalink/1252338398128515/ and these were the main points:

  • Set the tablet settings, on the driver and on the software used for drawing. For example, pressure sensitivity.
  • Check the projection: what screen you're using to project the table and ensure the "constrain proportions" setting is checked.
  • Consider line stabilizing software like Lazy Nezumi Pro (only Windows so far). Sketchbook Pro has this sort of line as well.
  • Use Mischief rather than Photoshop for line drawing. It's simpler and produces more natural line drawing, which can be later exported for rendering in Photoshop.
  • Get comfortable with using undo constantly.
  • Use hard felt nibs for the tablet, the have increased friction and feel more like a pen on paper.
@miguelff
miguelff / debugging_c_with_llvm.md
Created May 24, 2018 13:07 — forked from gregmalcolm/debugging_c_with_llvm.md
Debugging C with llvm's clang and lldb

Assuming you llvm installed (comes as standard on Mac OS Mavrick xtools)

Create a helloworld.c file:

  #include<stdio.h>
  
  int main()
  {
 int x=3;
@miguelff
miguelff / tee.rb
Last active August 9, 2018 10:18
Just run `ruby tee.rb`
require "set"
@mantras = Set.new
trap "SIGINT" do
puts "YOU HAVEN'T FINISHED YET!"
end
def learn(&instructions)
instance_eval &instructions
@miguelff
miguelff / .travis.yml
Created July 21, 2019 16:32 — forked from ryboe/.travis.yml
Example .travis.yml for Golang
# use the latest ubuntu environment (18.04) available on travis
dist: xenial
language: go
# Force-enable Go modules. Also force go to use the code in vendor/
# These will both be unnecessary when Go 1.13 lands.
env:
- GO111MODULE=on
- GOFLAGS='-mod vendor'
@miguelff
miguelff / latency.markdown
Created November 18, 2019 09:46 — 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

Keybase proof

I hereby claim:

  • I am miguelff on github.
  • I am miguelff (https://keybase.io/miguelff) on keybase.
  • I have a public key ASBI6T5HfJcq531pX597-0OiXujhozFobuX58IqS8qHR8go

To claim this, I am signing this object:

WITH fulfillment_method_classification AS (
SELECT
f._shop_key,
f."order id",
f."shop shipping country",
f."fulfillment id",
CASE
WHEN ofsd."is shopify shipping fulfillment" = 'Fulfilled via Shopify Shipping'
THEN 'Shopify Shipping'
WHEN _api_client_key = -2