Skip to content

Instantly share code, notes, and snippets.

View hugochinchilla's full-sized avatar
🤖
I'm not a robot

Hugo Chinchilla Carbonell hugochinchilla

🤖
I'm not a robot
View GitHub Profile
@hugochinchilla
hugochinchilla / PHP-lint.sublime-build
Created June 25, 2015 11:09
Sublime PHP builder (not really)
# ~/.config/sublime-text-3/Packages/User/PHP-lint.sublime-build
{
"shell": true,
"cmd": ["php -l $file && php-cs-fixer --config-file=/path/to/csfixer.conf fix $file"]
}
@hugochinchilla
hugochinchilla / README.md
Last active August 29, 2015 14:27 — forked from andris9/README.md
Extremely simple HTTP proxy for changing Host: header Useful when proxying requests to virtual hosts that require Host: header to be set.

Setup reverse tunnel

Run the following in your client machine

ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST

Where

  • EXPOSED_PORT is the port exposed to the internet in the proxy server
  • SERVICE_PORT is the port your application is listening in your machine
<?php
public function configure()
{
$this->setWidget('hab_customer_location_list', $this->getHabLocationChoiceWidget());
}
protected function getHabLocationChoiceWidget()
{
#include "NikonRemote.h"
const int potPin = A0;
const int ledPin = 13;
const int irPin = 8;
const int jackPin = 12;
// config values
const int minDelay = 100;
const int blinkLength = 150;
@hugochinchilla
hugochinchilla / sflphone-callto.py
Created November 25, 2015 10:09
SFLphone handler for "callto" or "tel" urls, uses the first enabled SIP account to place the call.
#!/usr/bin/env python
from os.path import expanduser
from os import popen
from yaml import load as load_yaml
from random import randint
from sys import argv
import re
import sys
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>a sketch</title>
<script type="text/javascript" src="undermine.js"></script>
</head>
<body>
<center>
@hugochinchilla
hugochinchilla / Exec.php
Last active December 23, 2015 08:49 — forked from vglebov/Exec.php
<?php
class Exec {
protected $commandLine;
protected $resultCode = 0;
protected $stdout;
protected $stderr;
public static function withCommandLine($commandLine){
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -fsSL https://test.docker.com/ | sh'
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports.jumpsuit=t(require("React"),require("ReactDOM")):e.jumpsuit=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=125)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports["material-ui"]=t(require("React"),require("ReactDOM")):e["material-ui"]=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};return t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=376)}([function(t,o){t.exports=e},function(e,t){e.exports=function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]