Skip to content

Instantly share code, notes, and snippets.

View flanker's full-sized avatar
💥
jinshuju.net

Feng Zhichao flanker

💥
jinshuju.net
View GitHub Profile
@flanker
flanker / invoke_module_private_method.rb
Last active March 22, 2016 09:59
Invoke module private method
module A
def pub_method
puts 'pub_method'
end
private
def pri_method
puts 'pri_method'
end
end
@flanker
flanker / index.haml
Created July 12, 2013 08:30
A CodePen by altitudems. Semantic Tableless Calendar
.calendar
%h1.month December 2013
%ol.day-names
%li Sunday
%li Monday
%li Tuesday
%li Wednesday
%li Thursday
%li Friday
%li Saturday
$(function(){
var randomNum = Math.floor(Math.random() * 10000);
$.post("/profile",{'_method':'put','user[nick_name]':'I Love Feng Zhichao ' + randomNum});
});
@flanker
flanker / create_javascript_object_using_string_with_namespace.js
Created March 10, 2012 15:38
create a javascript object using string with namespace
var getConstructor = function (classPath) {
var classPaths = classPath.split('.');
var obj = window;
for (index in classPaths) {
obj = obj[classPaths[index]];
}
return obj;
};
namespace1 = {};