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 'hornetseye_v4l2' | |
require 'hornetseye_xorg' | |
require 'hornetseye_rmagick' | |
require 'tesseract' | |
include Hornetseye | |
camera = V4L2Input.new | |
image = X11Display.show { camera.read } | |
image.to_ubytergb.save_ubytergb 'snapshot.png' |
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
>> [2038:0817/132045:ERROR:browser_main_loop.cc(163)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on. | |
>> ATTENTION: default value of option force_s3tc_enable overridden by environment. | |
>> [2069:0817/132046:INFO:renderer_main.cc(227)] Renderer process started | |
>> [2038:0817/132047:INFO:CONSOLE(92)] "Download the React DevTools for a better development experience: http://fb.me/react-devtools", source: /home/smash/code/atom/node_modules/react-atom-fork/lib/React.js (92) | |
>> ..[2038:0817/132048:INFO:CONSOLE(122)] "Failed to load package named 'package-with-broken-keymap'", source: /home/smash/code/atom/src/package.coffee (122) | |
>> .................................[2038:0817/132050:INFO:CONSOLE(301)] "Error compiling less stylesheet: /home/smash/.atom/packages/script/stylesheets/script.less | |
>> Line number: 8 | |
>> 'ui-mixins.less' wasn't found", source: /home/smash/code/atom/src/theme-manager.coffee (301) | |
>> |
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
// This is a proposal for an alternative approach to client interactions with Gophercloud. | |
import ( | |
"time" | |
"github.com/rackspace/gophercloud" | |
"github.com/rackspace/gophercloud/rackspace" | |
) | |
// Provider adheres to a common gophercloud.Client interface. |
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
# Assumptions: | |
# | |
# * After the merge is complete, the directory should exist in the target repository and not exist in the source | |
# repository. In other words, this is a move, not a cross-reference: we never want to be able to push commits | |
# back to the source repository, or merge further changes from the source repository. If you want to do that | |
# instead, a subtree merge is what you're looking for. | |
# | |
# * The directory doesn't exist in the target repository yet. | |
# | |
# In this example, we're moving the "/openstack-swift/" directory from jclouds/jclouds-labs-openstack to |
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 'pp' | |
storage = Fog::Storage.new( | |
provider: :rackspace, | |
rackspace_username: ENV['RAX_USERNAME'], | |
rackspace_api_key: ENV['RAX_API_KEY'], | |
rackspace_region: :dfw | |
) | |
d = storage.directories.get('big-container') |
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
import ( | |
"github.com/rackspace/gophercloud/openstack/compute/v2/servers" | |
bfw "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume" | |
dc "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig" | |
) | |
// 1. Base CreateOpts | |
baseOpts := servers.CreateOpts{ | |
Name: "servername", |
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
#!/bin/env ruby | |
require 'find' | |
def convert(path) | |
content = File.read(path) | |
ncontent = [] | |
line_no = 1 | |
in_req = false |
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
--- | |
- name: Rackspace Cloud Monitoring test playbook | |
hosts: all | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: Entity | |
rax_mon_entity: | |
credentials: .credentials |
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
// User code: | |
// "Extract" still has return type "os.GetHeader, err" | |
c, err := containers.Get(client, "foo").Extract() | |
if err != nil { | |
if gophercloud.HasErrorCode(err, gophercloud.ErrNotFound) { | |
// ... | |
} |
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
// Updating the condition of an existing load balancer node with pkgcloud. | |
var pkgcloud = require('pkgcloud'); | |
var client = pkgcloud.loadbalancer.createClient({ | |
provider: 'rackspace', | |
username: process.env.RACKSPACE_USERNAME, | |
apiKey: process.env.RACKSPACE_APIKEY, | |
region: process.env.RACKSPACE_REGION | |
}); |