Skip to content

Instantly share code, notes, and snippets.

View ryanstout's full-sized avatar

Ryan Stout ryanstout

View GitHub Profile
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)
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)
<!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 %>
daemon off;
events {
worker_connections 4096; ## Default: 1024
}
http {
include mime.types;
# serve static files when asked to
sendfile on;
module InGem
class BlueController
def index
puts 'in gem'
end
class BlueTemplate
def path
'blue_template'
end
daemon off;
events {
worker_connections 4096; ## Default: 1024
}
http {
include mime.types;
# serve static files when asked to
sendfile on;
# A sample Gemfile
source "https://rubygems.org"
gem 'rtanque', git: 'https://github.com/andrew/RTanque.git'
gem 'texplay', '0.4.4.pre'
func (fh *FileHandle) Read(req *fuse.ReadRequest, resp *fuse.ReadResponse, intr fs.Intr) fuse.Error {
// fmt.Printf("Read %s - %d at %d\n", fh.FuseFile.Path, req.Size, req.Offset)
buf := make([]byte, req.Size)
// fmt.Printf("ReadAt: %d -- %d -- %d - %s\n", req.Offset, req.Size, len(resp.Data), fh.FuseFile.Path)
size, err := fh.File.ReadAt(buf, req.Offset)
if err != nil && err != io.EOF {
fmt.Printf("ERR FROM READ: %s\n", err)
func (fh *FileHandle) Write(req *fuse.WriteRequest, resp *fuse.WriteResponse, intr fs.Intr) fuse.Error {
// fmt.Printf("Write %s - %d at %d\n", fh.FuseFile.Path, len(req.Data), req.Offset)
fh.WrittenTo = true
size, err := fh.File.WriteAt(req.Data, req.Offset)
resp.Size = size
if err != nil {
fmt.Printf("Write Error: %s\n", err)
class User < Volt::Model
validate do
if signed_up?
validate :password, password: true
end
end
end