Skip to content

Instantly share code, notes, and snippets.

Avatar

Davide D'Agostino DAddYE

  • Uber
  • San Francisco
View GitHub Profile
View monofont.css
@font-face{
font-family: 'JetBrains Mono';
src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'),
url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
* {
-webkit-font-feature-settings: "liga" on, "calt" on;
View configuration.nix
{ config, pkgs, lib, ... }:
{
# This configuration worked on 09-03-2021 nixos-unstable @ commit 102eb68ceec
# The image used https://hydra.nixos.org/build/134720986
boot = {
kernelPackages = pkgs.linuxPackages_rpi4;
tmpOnTmpfs = true;
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
@DAddYE
DAddYE / .gitconfig
Last active Apr 11, 2022 — forked from mudphone/.gitconfig
A simple .gitconfig file.
View .gitconfig
[user]
name = DAddYE
email = info@daddye.it
[alias]
co = checkout
st = status
ci = commit
br = branch
sm = submodule
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
View keybase.md

Keybase proof

I hereby claim:

  • I am daddye on github.
  • I am daddye (https://keybase.io/daddye) on keybase.
  • I have a public key whose fingerprint is 8F39 912A 097E 377E 1E00 32CD AF60 5C47 8698 A064

To claim this, I am signing this object:

View fix permissions brew.sh
cd /usr/local
sudo chown -R daddye:admin .
git init
git remote | while read i; do git remote remove $i; done
git reset --hard
git remote add -m master -t master -f --tags origin git://github.com/mxcl/homebrew.git
@DAddYE
DAddYE / The Technical Interview Cheat Sheet.md
Last active Mar 10, 2022 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@DAddYE
DAddYE / example.rb
Last active Aug 29, 2015 — forked from hamin/example.rb
An updated Rust 1.x version of Yehuda's Native Rust Extension post here http://blog.skylight.io/bending-the-curve-writing-safe-fast-native-gems-with-rust/
View example.rb
require "./points"
p1 = RustPoint::make_point(10, 10) # => #<Fiddle::Pointer:0x007f8231e56510 ptr=0x0000010b824000 size=0 free=0x00000000000000>
p2 = RustPoint::make_point(20, 20) # => #<Fiddle::Pointer:0x007f8231f20970 ptr=0x0000010b824010 size=0 free=0x00000000000000>
RustPoint::get_distance(p1, p2) # => 14.142135623730951
@DAddYE
DAddYE / randomID.go
Created Jul 30, 2015
Generate pseudo random numbers
View randomID.go
package main
import (
"crypto/rand"
"math/big"
)
var maxID = new(big.Int).SetUint64(^uint64(0))
func genRandomID() uint64 {
@DAddYE
DAddYE / vim.md
Last active Aug 29, 2015
Shortcuts that I tend to forget.
View vim.md

CtrlP

<F5>  " to purge the cache for the current directory to get new files, remove deleted files and apply new ignore options.
<c-f> " and `<c-b>` to cycle between modes.
<c-d> " to switch to filename only search instead of full path.
<c-r> " to switch to regexp mode.
<c-t> " or `<c-v>`, `<c-x>` to open the selected entry in a new tab or in a new split.
<c-z> " to mark/unmark multiple files and `<c-o>` to open them.
View opencv.rb
require 'formula'
class Opencv < Formula
homepage 'http://opencv.org/'
url 'https://github.com/Itseez/opencv/archive/2.4.9.tar.gz'
sha1 'd16ced627db17f9864c681545f18f030c7a4cc0b'
# CUDA needs 2.4.10 (see #1228)
# url 'https://github.com/Itseez/opencv/archive/2.4.10.tar.gz'
# sha1 'a0c2d5944364fc4f26b6160b33c03082b1fa08c1'
head 'https://github.com/Itseez/opencv.git'