Skip to content
View eos550d
0.000726 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:
0.002714 main(2): gphoto2 2.5.2
0.004418 main(2): gphoto2 has been compiled with the following options:
0.005955 main(2): + gcc (C compiler used)
0.007421 main(2): + popt (mandatory, for handling command-line parameters)
0.008819 main(2): + exif (for displaying EXIF information)
0.009623 main(2): + no cdk (for accessing configuration options)
0.009776 main(2): + no aa (for displaying live previews)
0.009944 main(2): + no jpeg (for displaying live previews in JPEG format)
0.010097 main(2): + no readline (for easy navigation in the shell)
View formotion.rb
@form = Formotion::Form.new({
sections: [
{
select_one: true,
rows: value["choices"].map do |choice|
{
title: choice["description"],
key: choice["description"],
value: value["current"] == choice["description"],
type: :check
View es.json
{
"from": 0,
"size": 30,
"query": {
"filtered": {
"filter": {
"and": [
{
"or": [
{
View piping.go
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
View postmark_scrape.rb
require "mechanize"
require "nokogiri"
require "json"
emails = []
a = Mechanize.new
a.get("https://postmarkapp.com/login") do |login_page|
servers_page = login_page.form_with(:id => 'new_user_session') do |form|
form.send "user_session[login]", ARGV[0]
View product.json
"products" : {
"product" : {
"properties" : {
"id" : {
"type" : "string",
"index" : "not_analyzed"
},
"product_name" : {
"type" : "string",
"analyzer" : "keyword"
View base.rb
require "sinatra/base"
require "sinatra/namespace"
require "multi_json"
require "api/authentication"
require "api/error_handling"
require "api/pagination"
module Api
class Base < ::Sinatra::Base
View gphoto2-single
james@ubuntu:~$ time gphoto2 --capture-image-and-download --force-overwrite --filename='foo.jpg' --frames=3 --interval=5
Time-lapse mode enabled (interval: 5s).
Capturing frame #1/3...
New file is in location /capt0000.jpg on the camera
Saving file as foo.jpg
Deleting file /capt0000.jpg on the camera
Deleting 'capt0000.jpg' from folder '/'...
Waiting for next capture slot 3 seconds...
Capturing frame #2/3...
New file is in location /capt0001.jpg on the camera
View ghuser.rb
require "test/unit"
class GHUserTest < Test::Unit::TestCase
def setup
@user = GHUser.new("bensie")
end
def test_has_a_name
assert_equal "James Miller", @user.name
end
View gist:3830814
require "bundler/setup"
require "nokogiri"
builder = Nokogiri::XML::Builder.new(encoding: 'UTF-8') do |xml|
xml.name "James" do
xml.number 1234
end
end
Something went wrong with that request. Please try again.