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
require 'uri' | |
require 'base64' | |
require 'openssl' | |
# NOTE: Oauth uses a specific unreserved character list for URL encoding. | |
def url_encode(input) | |
unreserved = '-._~0-9A-Za-z' # These are the only characters that should not be encoded. | |
URI.escape(input, Regexp.new("[^#{unreserved}]")) | |
end |
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/ruby | |
require 'getoptlong' | |
filename = "" | |
blocksize = 1024 | |
opts = GetoptLong.new( | |
[ "-f", "--file", GetoptLong::REQUIRED_ARGUMENT], | |
[ "-b", "--block", GetoptLong::REQUIRED_ARGUMENT] |
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 ruby | |
require 'logger' | |
$stdout.sync = true | |
$stdin.sync = true | |
path = "/usr/local/var/log/ejabberd/auth.log" | |
file = File.open(path, File::WRONLY | File::APPEND | File::CREAT) | |
file.sync = true |
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 ruby | |
require 'logger' | |
require 'rest_client' | |
$stdout.sync = true | |
$stdin.sync = true | |
path = "/usr/local/var/log/ejabberd/auth.log" | |
file = File.open(path, File::WRONLY | File::APPEND | File::CREAT) |
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
/* | |
* http://requirejs.org/docs/optimization.html | |
* | |
* Use NodeJs to execute the r.js optimization script on this build script | |
* node r.js -o app.build.js | |
* | |
* See: https://github.com/jrburke/r.js/blob/master/build/example.build.js for an example build script | |
* | |
* If you specify just the name (with no includes/excludes) then all modules are combined into the "main" file. | |
* You can include/exclude specific modules though if needed |
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
({ | |
baseUrl: "../js", | |
mainConfigFile: "../js/main.js", | |
optimize: "none", | |
name: "main", | |
//excludeShallow: ["jquery", "handlebars", "leaflet", "wax"], | |
out: "../js/main-built.js", | |
paths: { | |
jquery: 'empty:', |
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
// START Handlebars | |
var Handlebars = { | |
precompile: function(){}, | |
compile : function(){}, | |
template : function(){} | |
}; | |
define( 'Handlebars', [], function(){ | |
return Handlebars; | |
}); |
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
<body> | |
<div class="divDemoBody"> | |
<h1>Bootstrap Modal Demo</h1> | |
<p><a href="http://scripting.com/stories/2012/01/11/bootstrapModalDemo.html">A simple demo</a> of a modal dialog in <a href="http://twitter.github.com/bootstrap/">Bootstrap</a>.</p><p>1. Click the button. 2. Enter a new title for the window. 3. Click OK.</p><p>We set the title of the window and close the dialog.</p> | |
<div id="windowTitleDialog" class="modal hide fade"> | |
<div class="modal-header"> | |
<a href="#" class="close">×</a> | |
<h3>Please enter a new title for this window.</h3> | |
</div> | |
<div class="modal-body"> |
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
modules: | |
- name: 'common_libs' | |
exclude: ['jquery'] | |
- name: 'application' | |
exclude: ['jquery', 'common_libs'] | |
- name: 'common' | |
exclude: ['jquery', 'common_libs'] | |
paths: | |
jquery: 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min' | |
jqueryui: 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.19/jquery-ui.min' |
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
modules: | |
- name: 'common_libs' | |
exclude: ['jquery'] | |
- name: 'application' | |
exclude: ['jquery', 'common_libs'] | |
- name: 'common' | |
exclude: ['jquery', 'common_libs'] | |
paths: | |
jquery: 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min' | |
jqueryui: 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.19/jquery-ui.min' |