Skip to content

Instantly share code, notes, and snippets.

View jesvs's full-sized avatar

Jesús Sánchez jesvs

View GitHub Profile
Index: ext/readline/readline.c
===================================================================
--- ext/readline/readline.c 2014-03-18 13:53:31.866359527 +0100
+++ ext/readline/readline.c 2014-03-18 13:56:26.390247250 +0100
@@ -1883,7 +1883,7 @@
rl_attempted_completion_function = readline_attempted_completion_function;
#if defined(HAVE_RL_PRE_INPUT_HOOK)
- rl_pre_input_hook = (Function *)readline_pre_input_hook;
+ rl_pre_input_hook = (rl_hook_func_t *)readline_pre_input_hook;
var textColor = function (bgColor) {
var output = runNetwork(bgColor);
if (output.black > .5) {
return 'black';
}
return 'white';
}
var runNetwork = function anonymous(input
/**/) {
@jesvs
jesvs / xmas.sketch
Created December 24, 2014 19:00
Arduino Cancion de Navidad
// Frecuencias de las notas
#define DO4 262
#define RE4 294
#define MI4 330
#define FA4 349
#define FAS4 370
#define SOL4 392
#define LA4 440
#define LAS4 466
#define SI4 494
body:after {
content: 'DEMO';
font-size: 319px;
color: rgba(255,0,0,0.3);
font-weight: 900;
position: fixed;
top: 50%;
left: 0;
right: 0;
pointer-events: none;
#!/bin/bash
# MPD recent songs playlist creator
# Usage: mpd_recent_playlist.sh [days]
# Config starts here
MPC_CONF=/etc/mpd.conf
PLAYLIST_TITLE="Recently Added"
FILETYPES="mp3|m4a|flac|ogg"
<application
android:name=".ParseApplication"
/>
<uses-permission android:name="android.permission.INTERNET" />
Pin Color Signal
1 BLACK GND
2 BLACK GND
3 RED ?
4 BLACK GND
5 YELLOW ENABLE
6 GREEN ADJUST
7 BLUE ?
8 BLACK GND
9 GREY VIN +12v
@jesvs
jesvs / index.html
Created October 9, 2017 11:43
CSS Image background preloader with fader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Preload background image</title>
<style media="screen">
* {
box-sizing: border-box;
@jesvs
jesvs / proxy.go
Created March 5, 2018 18:09
Golang: Change the proxy net/http uses during execution.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
// Go's net/http gets (and caches) the environment variable HTTP_PROXY
@jesvs
jesvs / ffmpeg-4.patch
Created July 10, 2018 11:17
Blender 2.79 ffmpeg 4.0.1 patch
--- a/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2018-07-10 02:29:54.725788354 -0600
+++ b/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp 2018-07-10 02:31:17.070473241 -0600
@@ -264,9 +264,9 @@
m_membuffer(buffer),
m_membufferpos(0)
{
- m_membuf = reinterpret_cast<data_t*>(av_malloc(FF_MIN_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE));
+ m_membuf = reinterpret_cast<data_t*>(av_malloc(AV_INPUT_BUFFER_MIN_SIZE + AV_INPUT_BUFFER_PADDING_SIZE));
- m_aviocontext = avio_alloc_context(m_membuf, FF_MIN_BUFFER_SIZE, 0, this,