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
class MyClass < Base | |
option 'value' | |
def some_method | |
puts option | |
end | |
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
MyApp::Application.configure do | |
config.log_tags = [UserLogger.get] | |
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
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0" xmlns:av="urn:schemas-sony-com:av"> | |
<specVersion> | |
<major>1</major> | |
<minor>0</minor> | |
</specVersion> | |
<device> | |
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC> | |
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType> | |
<friendlyName>DSC-QX10</friendlyName> | |
<manufacturer>Sony Corporation</manufacturer> |
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
class SomeApp | |
def some_function(a) | |
puts a | |
Views::Index.instance_eval do | |
attr_reader :a | |
set_instance_variable(:@a, a) | |
end | |
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
class SomeApp | |
def some_function(a) | |
puts a | |
end | |
module Views | |
class Index < Mustache | |
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
namespace :csshx do | |
task :install do | |
`which csshx` | |
if $? != 0 | |
Bundler.with_clean_env do | |
run_locally 'brew install csshx' | |
end | |
end | |
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
var myClass = { | |
myMethod: function () { | |
console.log('foo'); | |
} | |
}; | |
// These are all equivalent in JS | |
myClass.myMethod() | |
myClass['myMethod']() |
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
<head> | |
<script type="text/javascript"> | |
var ready = false; | |
var caman = Caman('#example', 'EdielOficial.JPG', function () { | |
this.render(function () { | |
ready = true; | |
//this.save('png'); // shows a download file prompt | |
}); | |
}); |
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
emitterLine: [ | |
{x: 670, y: 170} | |
{x: 735, y: 370} | |
] |
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
function hasProperty() { | |
var args = Array.prototype.slice.call(arguments, 0); | |
var obj = args.shift(); | |
var ref = obj; | |
for (var i = 0, _len = args.length; i < _len; i++) { | |
if (!ref[args[i]]) return false; | |
ref = ref[args[i]]; | |
} | |