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
// this sets the background color of the master UIView (when there are no windows/tab groups on it) | |
Titanium.UI.setBackgroundColor('#000'); | |
VideoStreamingTest = {}; | |
Ti.include('streamingvideo.js'); | |
// create tab group | |
var tabGroup = Titanium.UI.createTabGroup(); |
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
//Usage example | |
var win = Ti.UI.createWindow(); | |
var loadingWindow = require('LoadingWindow')(); | |
win.add(loadingWindow); | |
//win.remove(loadingWindow) | |
win.open(); |
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
$('body').on('touchstart.dropdown', '.dropdown', function (e) { e.stopPropagation(); }); |
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
function removeChildrens(objeto) { | |
for (i in objeto.children) { | |
var child=objeto.children[0]; | |
removeChildrens(child); | |
objeto.remove(child); | |
child=null; | |
} | |
} |
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
exim -bpru|awk {'print $3'}|xargs exim -Mrm |
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
netstat -plan |grep :80 | awk '{print $5}' |cut -d: -f1 |sort |uniq -c |sort -nr |
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
cat /var/log/httpd/access.log | awk '{print $1}'| sort -n | uniq -c | sort -rn | head -n10 |
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
#from http://blog.divebomb.org/2012/01/ruby-sinatra-and-ssl/ | |
require 'sinatra/base' | |
require 'webrick' | |
require 'webrick/https' | |
require 'openssl' | |
name = "/C=US/ST=SomeState/L=SomeCity/O=Organization/OU=Unit/CN=localhost" | |
ca = OpenSSL::X509::Name.parse(name) | |
key = OpenSSL::PKey::RSA.new(1024) | |
crt = OpenSSL::X509::Certificate.new | |
crt.version = 2 |
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
require 'rubygems' | |
require 'aws-sdk' | |
backup_dir = "/backup/cpbackup/" #end with / | |
users = "appspinc,arturo" #cpanel accounts to backup | |
users = users.split(",") | |
bucket = 'BUCKET_NAME' |
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
cat access_log |awk '{print $1}' |sort | uniq -c | sort -n |
OlderNewer