This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @xxleite under [BeerWare] license | |
function parse_qs(fullpath) { | |
var splitted_path = fullpath.split('?'); | |
var re = /[&\?]?([^=&?$?]+)=?([^&?$?]*)/ig, list = { | |
path:splitted_path[0].replace(/(.*\/)([^$]*)/g, '$2'), | |
qs:{}, iqs:{}}, res = [], current = ''; | |
while(res = re.exec(splitted_path[1])) { | |
if(res[1].slice(-2) == '[]') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pt_BR = array('o', 'a', 'os', 'as', 'um', 'uma', 'uns', 'umas', 'porque', 'como', 'vez', 'já', 'que', 'embora', 'ainda', 'mesmo', 'apesar', | |
'se', 'desde', 'contanto', 'caso', 'conforme', 'segundo', 'consoante', 'mais', 'menos', 'para', 'à', 'passo', 'ao', 'logo', 'assim', 'por'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pinote-service | |
pinote-service is a web *API* design to pinote app written in [Lua](http://www.lua.org) that runs over [Gin](http://gin.io) and [Openresty](http://openresty.org) | |
# Table of contents | |
* [Status](#markdown-header-status) | |
* [Instalation](#markdown-header-instalation) | |
* [Deploy](#markdown-header-deploy) | |
* [API](#markdown-header-api) | |
* [Overall specifications](#markdown-header-overall-specifications) | |
* [*](#markdown-header-42) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ftee - clone stdin to stdout and to a named pipe | |
(c) racic@stackoverflow | |
WTFPL Licence */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php namespace app; | |
/** | |
* | |
*/ | |
use \Slim\App as App; | |
use \Slim\Views\Lightncandy as Lightncandy; | |
define(BLANK, ''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -e | |
export PREFIX=$HOME/.bin && mkdir -p $PREFIX && export PATH=$PATH:$PREFIX/bin | |
if [ "$(expr substr $LUA 1 6)" == "luajit" ]; then | |
git clone http://luajit.org/git/luajit-2.0.git luajit && cd luajit | |
[[ "$LUA" == "luajit2.1" ]] && git checkout v2.1 || git checkout v2.0.4 | |
CFLAGS="$CFLAGS -DLUAJIT_ENABLE_LUA52COMPAT" make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# find equal ref (from, to) in members of relation | |
# | |
# @author leite <[email protected]> | |
# @license GPL version 3 | |
# | |
relation=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lua | |
-- | |
-- find equal ref (from, to) in members of relation | |
-- | |
-- @author leite <[email protected]> | |
-- @license GPL version 3 | |
-- | |
assert(arg[1], 'argument should be a file path') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#0 0x0000000000606423 in php_array_data_compare (a=<optimized out>, b=<optimized out>) at /build/php5-pO28mL/php5-5.5.9+dfsg/ext/standard/array.c:373 | |
#1 0x000000000070355c in zend_qsort_r (base=<optimized out>, nmemb=<optimized out>, siz=siz@entry=8, compare=compare@entry=0x606400 <php_array_data_compare>, arg=arg@entry=0x0) | |
at /build/php5-pO28mL/php5-5.5.9+dfsg/Zend/zend_qsort.c:87 | |
#2 0x00000000007036a8 in zend_qsort (base=<optimized out>, nmemb=<optimized out>, siz=siz@entry=8, compare=compare@entry=0x606400 <php_array_data_compare>) | |
at /build/php5-pO28mL/php5-5.5.9+dfsg/Zend/zend_qsort.c:123 | |
#3 0x0000000000607e86 in php_array_intersect (ht=<optimized out>, return_value=0xc757cb0, behavior=1, data_compare_type=<optimized out>, key_compare_type=0, | |
return_value_used=<optimized out>, this_ptr=<optimized out>, return_value_ptr=<optimized out>) at /build/php5-pO28mL/php5-5.5.9+dfsg/ext/standard/array.c:3174 | |
#4 0x00000000006ddbdb in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci= |