Skip to content

Instantly share code, notes, and snippets.

View matiasinsaurralde's full-sized avatar

Matias Insaurralde matiasinsaurralde

  • Paraguay
View GitHub Profile
#!/bin/sh
# latest trac!
wget "http://download.edgewall.org/trac/Trac-1.0.1.tar.gz"
tar xf Trac-1.0.1.tar.gz
cd Trac-1.0.1
require 'socket'
require 'base64'
Refresh = 1 # seconds to refresh image on server
screen_capture_command = 'screencapture -C -x tmp.png'
image = ''
latest = Time.now
server = TCPServer.new 3000
loop do
@matiasinsaurralde
matiasinsaurralde / main.cpp
Last active August 29, 2015 14:22 — forked from gokmen/main.cpp
#include <QDebug>
#include <QWidget>
#include <QNetworkReply>
#include <QSslConfiguration>
App::App(QWidget *parent) :
QWidget(parent),
ui(new Ui::App)
{
ui->setupUi(this);
@matiasinsaurralde
matiasinsaurralde / up-and-running-with-edeliver-on-do.md
Created July 4, 2016 14:17 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
@matiasinsaurralde
matiasinsaurralde / response_header_modifier.js
Created August 23, 2016 02:48 — forked from mrajagopal/response_header_modifier.js
LineRate's Node.js script to modify the HTTP response header
"use strict";
var vsm = require('lrs/virtualServerModule');
var requestHandler = function(servReq, servResp, next){
servReq.on('response', function responseHandler(cliResp){
cliResp.bindHeaders(servResp);
servResp.removeHeader("Server");
servResp.removeHeader("X-Powered-By");
@matiasinsaurralde
matiasinsaurralde / bindings-cheat-sheet.md
Created August 23, 2016 15:02 — forked from eendeego/bindings-cheat-sheet.md
Node/V8 bindings cheat sheet
@matiasinsaurralde
matiasinsaurralde / Makefile
Created August 24, 2016 11:39 — forked from huxuan/Makefile
Hello World for LuaJIT FFI/C++ binding.
all: lib run
lib:
g++ -shared -fPIC -o libhello.so libhello.cpp hello.cpp
run:
luajit main.lua
clean:
rm *.so
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@matiasinsaurralde
matiasinsaurralde / problem.cpp
Created April 2, 2017 10:07 — forked from depp/problem.cpp
A Faster Solution
// Faster solution for:
// http://www.boyter.org/2017/03/golang-solution-faster-equivalent-java-solution/
// With threading.
// g++ -std=c++11 -Wall -Wextra -O3 -pthread
// On my computer (i5-6600K 3.50 GHz 4 cores), takes about ~160 ms after the CPU
// has warmed up, or ~80 ms if the CPU is cold (due to Turbo Boost).
// How it works: Start by generating a list of losing states -- states where the
// game can end in one turn. Generate a new list of states by running the game
@matiasinsaurralde
matiasinsaurralde / pupil.py
Created May 27, 2017 04:23 — forked from edfungus/pupil.py
Pupil Detection with Python and OpenCV
#Identify pupils. Based on beta 1
import numpy as np
import cv2
import time
cap = cv2.VideoCapture(0) #640,480
w = 640
h = 480