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
#include <sys/types.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int fdin, fdout, retval; | |
char buf[2048]; | |
ssize_t nread, nwrote; | |
fdin = open("readfile", O_RDONLY); | |
fdout = open("writefile", O_CREAT | O_WRONLY, 0644); | |
nread = read(fdin, buf, 2048); | |
nwrote = write(fdout, buf, (size_t)nread); |
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
desc 'generate a class in lib/ and a spec in spec/lib/ for name=underscored_class_name' | |
task :genclass do | |
require 'erb' | |
filename = ENV['name'] | |
raise 'must specify name=underscored_class_name' unless filename | |
classname = filename.camelize | |
class_file_template = ERB.new <<-EOF | |
class <%= classname %> |
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
iPhone Developer: Micah Alles (S54AU7NS4Z) |
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
Motion::Project::App.setup do |app| | |
... | |
app.codesign_certificate = File.read(".devcert").strip if File.exists?(".devcert") | |
... | |
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
asdfad |
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 comments = [ | |
{ author: "Dave Crosby", approved: true, text: "Sounds Delicous!" }, | |
{ author: "Micah Alles", approved: false, text: "What next?!?" }, | |
{ author: "Drew Colthorp", approved: true, text: "Thanks for the info." } | |
]; | |
$("#my-template").expand({ | |
content: "Step 1, light the grill. Step 2...", | |
comments: function(el) { | |
var approvedComments = []; |
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 comments = ["Sounds delicious!", "What next?!?"]; | |
// or, if there are no comments | |
// var comments = []; | |
$("#my-template").expand({ | |
content: "Step 1, light the grill. Step 2...", | |
comments: function(el) { | |
if (comments.length == 0) { | |
return false; // this will remove the comments div |
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
$("#my-template").expand({ author: false }) |
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
$("#my-template").expand({ | |
author: { "addClass()": "awesome" }, | |
"$input[name=comment]": { "val()": "nice post!" } | |
}) |
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
$("#my-template").expand({ | |
"$input[name=like]": { ":checked": true } | |
}) |
NewerOlder