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
producer[x, y] = hl.sin(x * y) | |
consumer[x, y] = (producer[x, y] + | |
producer[x, y+1] + | |
producer[x+1, y] + | |
producer[x+1, y+1])/4 | |
xo, yo, xi, yi = hl.Var("xo"), hl.Var("yo"), hl.Var("xi"), hl.Var("yi") | |
consumer.tile(x, y, xo, yo, xi, yi, 4, 4) | |
producer.compute_at(consumer, xo) |
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
0.000097 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST: | |
0.000124 main (2): gphoto2 2.5.17.1 | |
0.000129 main (2): gphoto2 has been compiled with the following options: | |
0.000132 main (2): + gcc (C compiler used) | |
0.000135 main (2): + popt (mandatory, for handling command-line parameters) | |
0.000138 main (2): + exif (for displaying EXIF information) | |
0.000140 main (2): + no cdk (for accessing configuration options) | |
0.000143 main (2): + no aa (for displaying live previews) | |
0.000145 main (2): + jpeg (for displaying live previews in JPEG format) | |
0.000147 main (2): + no readline (for easy navigation in the shell) |
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(undefined) { | |
// The Opal object that is exposed globally | |
var Opal = this.Opal = {}; | |
// The actual class for BasicObject | |
var RubyBasicObject; | |
// The actual Object class | |
var RubyObject; |
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 'binding_of_caller' | |
class String | |
def h | |
args = self.split(/,/).map {|a| a.strip } | |
arg_vals = args.map {|a| [a, binding.of_caller(2).eval(a)] } | |
return Hash[arg_vals] | |
end |
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
<!-- CrowdTranslator JS --> | |
<script type="text/javascript"> | |
(function() { | |
var ct = document.createElement('script'); ct.type = 'text/javascript'; ct.async = true; | |
ct.src = ('https:' == document.location.protocol ? 'https://d20z6ezet11y6s.cloudfront.net' : 'http://jscdn.crowdtranslator.com') + '/javascripts/page_translator.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ct, s); | |
})(); | |
</script> | |
<!-- End CrowdTranslator JS --> |
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
# How to run a generator from a plugin's install.rb | |
begin | |
# First have to load up rails | |
unless Kernel.const_defined?('RAILS_ROOT') | |
Kernel.const_set('RAILS_ROOT', File.join(File.dirname(__FILE__), '..', '..', '..')) | |
end | |
if (File.exists?(RAILS_ROOT) && File.exists?(File.join(RAILS_ROOT, 'app'))) | |
require "#{RAILS_ROOT}/config/boot" |
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
<!DOCTYPE html> | |
<html> | |
<%# IMPORTANT: Please read before changing! %> | |
<%# This file is rendered on the server using ERB, so it does NOT use Volt's %> | |
<%# normal template system. You can add to it, but keep in mind the template %> | |
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %> | |
<head> | |
<meta charset="UTF-8" /> | |
<%= javascript_tags %> | |
<%= css_tags %> |
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
daemon off; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} | |
http { | |
include mime.types; | |
# serve static files when asked to | |
sendfile on; |
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
module InGem | |
class BlueController | |
def index | |
puts 'in gem' | |
end | |
class BlueTemplate | |
def path | |
'blue_template' | |
end |
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
daemon off; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} | |
http { | |
include mime.types; | |
# serve static files when asked to | |
sendfile on; |
NewerOlder