Skip to content

Instantly share code, notes, and snippets.

View develCuy's full-sized avatar
🎯
Focusing

Fernando develCuy

🎯
Focusing
View GitHub Profile
@develCuy
develCuy / gist:11263308
Created April 24, 2014 17:48
Ophal version of route(menu) callbacks(ala D6/D7):
--[[
Implements hook route().
]]
function route()
items = {}
-- Local callback, no arguments
items['frontpage'] = {
page_callback = 'front_page',
@develCuy
develCuy / gist:3dbf213bca4f9087f3b8
Created August 1, 2014 21:24
devcoind 0.9... errors/warnings
In file included from bitcoinrpc.h:17:0,
from rpcwallet.cpp:10:
json/json_spirit_writer_template.h: In function ‘String_type json_spirit::non_printable_to_string(unsigned int)’:
json/json_spirit_writer_template.h:31:50: warning: typedef ‘Char_type’ locally defined but not used [-Wunused-local-typedefs]
typedef typename String_type::value_type Char_type;
@develCuy
develCuy / sendmail.lua
Created April 8, 2015 01:24
fake sendmail / just another null mailer written in Lua and seawolf
#!/usr/bin/env lua5.1
local seawolf = require 'seawolf'.__build('variable', 'behaviour')
local print_r = seawolf.variable.print_r
local temp_dir = seawolf.behaviour.temp_dir
local ts = os.date('%Y-%m-%d %H:%M:%S')
local output = ([[----
-- %s
/*
tabSlideOUt v1.3.1 (altered by develCuy)
v1.3 by katowulf, bmazoka
Originally by William Paoli: http://wpaoli.building58.com
To use you must have an image ready to go as your tab
Make sure to pass in at minimum the path to the image and its dimensions:
example:
@develCuy
develCuy / uuid_test.lua
Created February 28, 2016 20:17
thread-safe UUID generator
local uuid = require 'uuid' -- From https://github.com/Tieske/uuid
local socket = require 'socket'
-- Get a unique seed
local seed, fh, err
for i = 1, 256 do
seed = socket:gettime()*10000
local filepath = ('/tmp/%s.uuid'):format(seed)
fh, err = io.open(filepath)
if fh then
#!/usr/bin/env sh
rm -f /tmp/*.uuid &&
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
lua uuid_test.lua &
Domain Name: drupal.lat
Domain ID: DOMAIN_3911-LAT
WHOIS Server: whois.akky.mx
Referral URL: http://www.akky.mx/jsf/domains/domain_abc/availability/search.jsf
Updated Date: 2016-04-18T09:01:00Z
Creation Date: 2016-04-13T00:17:36Z
Registry Expiry Date: 2017-04-13T00:17:36Z
Sponsoring Registrar: Akky una division de NIC Mexico
Sponsoring Registrar IANA ID: 1705
Domain Status: inactive [MORE INFO]
@develCuy
develCuy / ta_5.php
Last active June 17, 2016 13:41
ta ta! ta!! ta!!! ta!!!!
<?php
/**
* @author: Maestro Longaniza (Q.E.P.D)
*
* Rev 1 by develCuy.
*/
$emphasys = '';
for ($i = 1; $i <= 5; $i++) {
print "ta" . $emphasys . " ";
@develCuy
develCuy / config.lua
Last active July 21, 2016 00:20
Luarocks /etc/luarocks/config.lua
rocks_servers = {
-- [[http://luarocks.org/repositories/rocks]]
'http://luarocks.org:8080',
'http://luarocks.org:8080/dev',
}
rocks_trees = {
home..[[/.luarocks]],
[[/usr/local]]
}
@develCuy
develCuy / pj_start.sh
Created September 13, 2016 23:15
Copy files from "src" folder into a memory partition
#!/usr/bin/env bash
SRC_PATH="src"
BKP_PATH="$SRC_PATH-ondisk"
INIT_SCRIPT=""
EXIT_SCRIPT=""
case "$1" in
up|"")
if [ -d "$BKP_PATH" ]; then
echo "ERROR: Folder $BKP_PATH is present, please fix manually and try again then."