This file contains 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
--[[ ©2012 Tangent128 | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
of the Software, and to permit persons to whom the Software is furnished to | |
do so, subject to the Conditions of the MIT License as specified here: | |
http://opensource.org/licenses/MIT |
This file contains 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
local lpeg = require"lpeg" | |
local C, P, R, S, V = lpeg.C, lpeg.P, lpeg.R, lpeg.S, lpeg.V | |
local white = S(" \t") ^ 0 | |
local digit = R("09") | |
local dot = P(".") | |
local eE = S("eE") | |
local sign = S("+-")^-1 | |
local mantissa = digit^1 * dot * digit^0 + dot * digit^1 + digit^1 |
This file contains 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 | |
# A bash script for muotning remote systems using sshfs | |
#------------------------------------------------------------ | |
clear | |
echo "This script will help you mount a remote system using sshfs." | |
echo "" | |
echo -n "Continue? (Y|n) > " | |
read a | |
if [ "$a" = "y" ] || [ "$a" = "Y" ] || \ | |
[ "$a" = "" ]; then |
This file contains 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 -e | |
############################# | |
# | |
# Auto Install Drupal on Debian/Ubuntu boxes | |
# Author: ricardo amaro | |
# https://drupal.org/user/666176 | |
# | |
# License: http://www.gnu.org/licenses/gpl-2.0.html | |
# |
This file contains 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
ko.bindingHandlers.tagsinput = { | |
init: function(element, valueAccessor, allBindings) { | |
var options = allBindings().tagsinputOptions || {}; | |
var value = valueAccessor(); | |
var valueUnwrapped = ko.unwrap(value); | |
var el = $(element); | |
el.tagsinput(options); | |
This file contains 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 | |
//set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); // optional | |
spl_autoload_register(function ($class) { | |
$file = preg_replace('#\\\|_(?!.+\\\)#','/', $class) . '.php'; | |
if (stream_resolve_include_path($file)) | |
require $file; | |
}); |
This file contains 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
- certain endpoints are always blocked | |
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
ngx.exit(403) | |
end | |
-- import requirements | |
local cjson = require "cjson" | |
-- setup some app-level vars | |
local app_id = "APP_ID" |
This file contains 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
// To start vlc with telnet remote control: | |
// ./VLC --extraintf rc --rc-host 0.0.0.0:3000 | |
// | |
// To connect to multiple vlc's | |
// node vlcrc.js host1:3000 host2:3000 | |
var net = require('net'); | |
var readline = require('readline'); | |
//addresses of servers |
This file contains 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 | |
# Startup script for soffice | |
# | |
# chkconfig: 2345 75 35 | |
# description: Run soffice in server mode | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
SOFFICE=/opt/openoffice.org2.4/program/soffice |
NewerOlder