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
# prosgres Migration tool for crystal frameworks | |
# just create a ./db folder and add some migrations files | |
# ./db/0.sql | |
# ./db/1.sql | |
# ... | |
# ./db/22.sql # and so on ... | |
# | |
# Usage : | |
# require "pg" # I use a modified version solisoft/crystal-pg for now until main repo deployed |
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
#include "gwan.h" // G-WAN API | |
#pragma link "hiredis" | |
#include "hiredis/hiredis.h" | |
typedef struct | |
{ | |
redisContext *rCont; | |
redisReply *rReply; | |
} data_t; | |
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
#user nobody; | |
worker_processes 8; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: nginx init.d dash script for Ubuntu or other *nix. | |
# Description: nginx init.d dash script for Ubuntu or other *nix. | |
### END INIT INFO |
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
#pragma link "Cello" | |
#include "gwan.h" // G-WAN API | |
#include "Cello.h" | |
int main(int argc, char *argv[]) | |
{ | |
var int_item = $(Int, 5); | |
xbuf_xcat(get_reply(argv), "Hello World %d", as_long(int_item)); | |
return 200; // HTTP status (200:'OK') | |
} |
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
// Ok First add a blank layout | |
var e = document.createElement("div"); | |
e.setAttribute("style", 'position:fixed;background: #fff;background: rgba(255,255,255,0.9); z-index: 100000;top:0;left:0;right:0;bottom:0;'); | |
e.setAttribute("id", "beli_imgs"); | |
document.body.appendChild(e); | |
var html = "<h1 style='text-align:center; color: orange; font-size: 20px;'>Beli Import</h1><div style='position:fixed; right:0; top: 0; padding: 10px;'><a href='javascript:document.getElementById(\"beli_imgs\").remove()'>Cancel</a></div>"; | |
html += "<div align='center' style='position:fixed; top:0; left: 0; right: 0; bottom:0; margin-top: 40px;'>"; |
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
// Ok First add a blank layout | |
var e = document.createElement("div"); | |
e.setAttribute("style", 'position:fixed;background: #fff;background: rgba(255,255,255,0.9); z-index: 100000;top:0;left:0;right:0;bottom:0;'); | |
e.setAttribute("id", "beli_imgs"); | |
document.body.appendChild(e); | |
var html = "<h1 style='text-align:center; color: orange; font-size: 20px;'>Beli Import</h1><div style='position:fixed; right:0; top: 0; padding: 10px;'><a href='javascript:document.getElementById(\"beli_imgs\").remove()'>Cancel</a></div>"; | |
html += "<div align='center' style='position:fixed; top:0; left: 0; right: 0; bottom:0; margin-top: 40px;'>"; |
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
// Ok First add a blank layout | |
var e = document.createElement("div"); | |
e.setAttribute("style", 'position:fixed;background: #fff;background: rgba(255,255,255,0.9); z-index: 100000;top:0;left:0;right:0;bottom:0;'); | |
e.setAttribute("id", "beli_imgs"); | |
document.body.appendChild(e); | |
var html = "<h1 style='text-align:center; color: orange; font-size: 20px;'>Beli Import</h1><div style='position:fixed; right:0; top: 0; padding: 10px;'><a href='javascript:document.getElementById(\"beli_imgs\").remove()'>Cancel</a></div>"; | |
html += "<div align='center' style='position:fixed; top:0; left: 0; right: 0; bottom:0; margin-top: 40px;'>"; |
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
aptitude update | |
aptitude install ruby1.9.1 libsqlite3-dev -y | |
wget http://gwan.com/archives/gwan_linux64-bit.tar.bz2 | |
tar -xf gwan_linux64-bit.tar.bz2 | |
mv gwan_linux64-bit /home/gwan | |
cd /home/gwan | |
mv 0.0.0.0_8080/ 0.0.0.0_80 | |
rm 0.0.0.0_80/#0.0.0.0/csp/tidy.c | |
/home/gwan/gwan -d |