Skip to content

Instantly share code, notes, and snippets.

View llopez's full-sized avatar

Luis Lopez llopez

View GitHub Profile
@llopez
llopez / pipe.rb
Created September 20, 2019 18:56
Playing with the idea of pipelining functions
class Pipe
attr_reader :value
def initialize(value)
@value = value
end
def pipe(func)
Pipe.new(func.call(@value))
end

Keybase proof

I hereby claim:

  • I am llopez on github.
  • I am luigibyte (https://keybase.io/luigibyte) on keybase.
  • I have a public key ASAkav1h-RKxEMJoa4sqlbwqtbbsS6dKcOkF67o_9CNLMAo

To claim this, I am signing this object:

// Paint example specifically for the TFTLCD breakout board.
// If using the Arduino shield, use the tftpaint_shield.pde sketch instead!
// DOES NOT CURRENTLY WORK ON ARDUINO LEONARDO
//Technical support:goodtft@163.com
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library
#include <TouchScreen.h>
#if defined(__SAM3X8E__)
// IMPORTANT: Adafruit_TFTLCD LIBRARY MUST BE SPECIFICALLY
// CONFIGURED FOR EITHER THE TFT SHIELD OR THE BREAKOUT BOARD.
// SEE RELEVANT COMMENTS IN Adafruit_TFTLCD.h FOR SETUP.
//Technical support:goodtft@163.com
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_TFTLCD.h> // Hardware-specific library
// The control pins for the LCD can be assigned to any digital or
// analog pins...but we'll use the analog pins as this allows us to
@llopez
llopez / test.csv
Created September 14, 2018 17:42
test table
name surname age
luis lopez 34
pepe perez 50
@llopez
llopez / board_spec.rb
Last active August 8, 2018 19:00
Chechers
# Provide the specs for a `Board` class
# This `Board` class has a `move_piece` method that expects 2 parameters,
# `from` that represents the initial position of a piece,
# 'to' that represents the end position of a piece.
# the method returns `true` if the movement was successful
# and a `false`` if it is not.
# Describe all the possible and not possible movements for a piece.
# The name of the game is `Chechers` (Damas in spanish)
@llopez
llopez / ffserver.conf
Created October 13, 2017 02:20
ffserver configuration example
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog -
<Feed cam.ffm>
File /tmp/cam.ffm
FileMaxSize 200K
class Form extends React.Component {
_fill(e) {
console.log(e.target.value);
}
render() {
return(
<form>
{this.props.children}
</form>
);
@llopez
llopez / Vagrantfile
Last active August 29, 2015 14:16
Ubuntu Server 14.04 + rbenv + ruby 2.2.0 + mysql-server + mysql-client + solr
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 3000, host: 8080
config.vm.provider "virtualbox" do |vb|
vb.memory = "2048"
end
@llopez
llopez / migrator.rake
Created June 23, 2014 21:42
Rake task for migrating to panda/s3
namespace :panda do
desc "Migrate to panda/s3"
task :migrate do
FileAttachment.all.select(&:video?).each{ |fa|
VideoAttachmentWorker.perform_async({
title: fa.title,
description: fa.description,
recordable_id: fa.attachable_id,
recordable_type: fa.attachable_type,