Skip to content

Instantly share code, notes, and snippets.

View sebasmagri's full-sized avatar

Sebastián Magrí sebasmagri

View GitHub Profile
@abalmos
abalmos / Cargo.toml
Created November 20, 2019 20:29
Using tokio-postgres with async-std runtime
[package]
name = "async-std-tokio-postgres"
version = "0.1.0"
authors = ["Andrew Balmos <andrew@balmos.org>"]
edition = "2018"
[dependencies]
tokio-postgres = { version = "0.5.0-alpha.1", default-features = false }
futures = "0.3.1"
futures-util = "0.4.1"
@axoplasm
axoplasm / gist:bdda3922fa43b2ef25d8
Last active January 17, 2018 12:41
Ditching Compass and Sass for LibSass

I had a large client framework extending my personal boilerplate that was taking upwards of 10seconds to compile with standard Ruby Sass. This framework had minimal dependencies:

I used Bundler to manage Ruby dependencies and ran tasks with Grunt — mainly compiling Sass via grunt-contrib-compass, and previewing with live-reload. Simple stuff.

But 10seconds was an unacceptable performance hit for me. I typically keep my monitor split in half (using Spectacle ), with a browser on one half and MacVim on the other. With Live Reload running I get a nearly realtime preview of my work … except for that one client framework, where I was gettin

@ghostbar
ghostbar / LICENSE
Last active November 11, 2022 18:30
Copyright © 2014 Jose Luis Rivas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@jpetazzo
jpetazzo / gist:6127116
Created July 31, 2013 23:21
Debian/Ubuntu containers protips, thanks to @spahl
# this forces dpkg not to call sync() after package extraction and speeds up install
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
# we don't need and apt cache in a container
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
@jacobian
jacobian / why open source django.md
Created July 24, 2013 17:49
Our arguments for open sourcing Django
  1. The code will get better. Linus' Law: "given enough eyeballs, all bugs are shallow": we'll be able to get community contributions and bug reports, and thus the code will grow better faster than we can grow it ourselves. Also, Joy's Law - "No matter who you are, most of the smartest people work for someone else": we'll get better code from people who don't work for us than from people who do.

  2. We'll write better code. Wall's 3rd great virtual of a programmer, Hubris: we'll write better code people we don't want other people to say bad things about us. We'll do better with the world watching than with just us.

  3. Increased ability to hire. We're a 19k circ newspaper in a town most people have never heard of. Open source will help put us on the map, make us a place people actually might be interested in working.

  4. When we do hire, we'll be able to hire pe

@unknowndomain
unknowndomain / The Maker's Bill of Rights.md
Last active December 14, 2015 11:49
The Maker's Bill of Rights

#The Maker's Bill of Rights

  1. Meaningful and specific parts lists shall be included.
  2. Cases shall be easy to open.
  3. Batteries should be replaceable.
  4. Special tools are allowed only for darn good reasons.
  5. Profiting by selling expensive special tools is wrong and not making special tools available is even worse.
  6. Torx is OK; tamperproof is rarely OK.
  7. Components, not entire sub-assemblies, shall be replaceable.
  8. Consumables, like fuses and filters, shall be easy to access.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
Las ideas son infinitas pero pocas tienen la posibilidad de cambiar
radicalmente la vida de un gran número de personas.
Este es el caso de una idea noble y arriesgada que se ha convertido en
una realidad gracias al maestro Abreu y Gustavo Dudamel. ¿Cómo le
cambiaría la vida a los reclusos penitenciarios si estos obtuvieran una
educación musical?.
Una de estas ideas - que al principio parecía descabellada - era la
noción de una computadora en cada hogar. Gracias a visionarios como Steve