Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / jargon.md
Last active August 29, 2015 14:26 — forked from cb372/jargon.md
Category theory jargon cheat sheet

Category theory jargon cheat sheet

A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)

I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.

Functor

A functor is something that supports map.

@diegopacheco
diegopacheco / The Technical Interview Cheat Sheet.md
Last active January 8, 2020 10:45 — forked from kod3r/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.

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.
@diegopacheco
diegopacheco / css_resources.md
Last active August 26, 2015 01:08 — forked from cachafla/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

SSH tunnel using putty

In the menu go to Connection -> SSH -> Tunnels

  • Select Dynamic below destination
  • Put 1024 as source port
  • Click on Add

Login.

Firefox config

Install collectd on Ubuntu 14.04

curl http://pkg.ci.collectd.org/pubkey.asc | sudo apt-key add -
sudo bash -c  'echo "deb http://pkg.ci.collectd.org/deb/ trusty collectd-5.5" > /etc/apt/sources.list.d/collectd-ci.list'
sudo apt-get update
sudo apt-get install collectd # This should install collectd version 5.5.x

Install rabbitmq on Ubuntu 14.0.4

Install collectd on Ubuntu 14.04

curl http://pkg.ci.collectd.org/pubkey.asc | sudo apt-key add -
sudo bash -c  'echo "deb http://pkg.ci.collectd.org/deb/ trusty collectd-5.5" > /etc/apt/sources.list.d/collectd-ci.list'
sudo apt-get update
sudo apt-get install collectd # This should install collectd version 5.5.x

Install Influxdb on Ubuntu 14.04

@diegopacheco
diegopacheco / 0_reuse_code.js
Created June 21, 2016 20:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@diegopacheco
diegopacheco / build.gradle
Created July 30, 2016 00:22 — forked from michail-nikolaev/build.gradle
Gradle - force transitive dependency version for some group
apply plugin: 'java'
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
//specifying a fixed version for all libraries with 'org.gradle' group
if (details.requested.group == 'org.springframework') {
details.useVersion "$springVersion"
}
}

Install git-pylint-commit-hook

$ pip install git-pylint-commit-hook

Add git pylint to a git repo as a hook

$ cd my_git_repo/.git/hooks
$ echo '#!/bin/sh
git-pylint-commit-hook
' > pre-commit
@diegopacheco
diegopacheco / Monad.scala
Created June 26, 2018 23:00 — forked from johnynek/Monad.scala
Short Monad Example in Scala
// Run this with: scala Monad.scala
trait Monad[M[_]] {
// in haskell, called return, but that's a reserved word
// constructs a Monad instance from the given value, e.g. List(1)
def apply[T](v: T): M[T]
// flatMap function, in scala:
def bind[T,U](m: M[T])(fn: (T) => M[U]): M[U]
// Laws these must follow are:
// identities: