Skip to content

Instantly share code, notes, and snippets.

View ThisIsMissEm's full-sized avatar

Emelia Smith ThisIsMissEm

View GitHub Profile
$('a[href^=#]').bind('click', function(e){
e.preventDefault();
var target = $(this).attr('href');
if(target !== "#"){
target = $(target);
$('html').animate({scrollTop: target.scrollTop() + target.offset()['top']}, 500);
}
return false;
});
$ git push origin master
>> To [email protected]:Miksago/Jet.js.git
>> ! [rejected] master -> master (non-fast forward)
>> error: failed to push some refs to '[email protected]:Miksago/Jet.js.git'
-----------------------------------------------------------------------------------------------------------------
Property / Method | Access | Type | Arguments | Returns
------------------------------------------------------------------------------------------------------------------
Jet
_uri private
base Function() String
loaded Function() Array
resolve Function Namespace String
_namespaces private Object Object
map.namespace :admin do |admin|
admin.resources :articles, :pages, :settings
admin.root :controller => "dashboard"
end
map.connect 'articles/', :controller => 'Site::Articles', :action => 'index'
map.connect 'articles/:slug', :controller => 'Site::Articles', :action => 'view'
map.connect ':slug', :controller => 'Site::Pages', :action => 'view'
-----------------
onreadystatechange : null
onload : null
GetWeakReference : GetWeakReference()
addEventListener : addEventListener()
setAttribute : setAttribute()
innerHTML :
parentNode : <head>
src : http://labjs.com/load2.js
ownerDocument : Document labjs.com
var scripts = document.getElementsByTagName('script');
for(var i=0; i<scripts.length; ++i) {
scripts[i].parentNode.removeChild(scripts[i]);
// Browsers won't garbage collect this object.
// So castrate it to avoid a major memory leak.
console.log('-----------------');
for (var prop in scripts[i]) {
console.log(prop, " : ", scripts[i][prop]);
}
}
desc "Starts the thin web server through rackup."
task :serve do
%x[rackup -p 9292 -s thin]
end
#!/bin/bash
echo ""
user="REMOTE_USER"
domain="REMOTE_DOMAIN"
mount_path="/YOUR/REMOTE/PATH"
local_path="YOUR/LOCAL/PATH"
if [ -d $local_path ]; then
jet.monitor = function(ns){
var parts = ns.split("."),
m = parts.pop();
fn = jet.namespace(parts.join("."))[m];
return function(){
console.log(ns+"("+Array.prototype.join.call(arguments, ", ")+")");
return fn.apply(jet.global, arguments || []);
};
};
jet.namespace = function(/*String*/ namespace, /*Object?*/ properties){
// summary:
// Creates & Resolves an objects structure based on the given Namespace string.
// namespace:
// A string representing an object tree, each level separated by a period.
// example:
// | jet.namespace("a.b.c");
// | #=> a = {}; a.b={}; a.b.c={};
// example: