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
Ubuntu 12.04 | |
## ubuntu@ubuntu:/tmp/chef-solo$ cat nodes/192.168.126.136.json | |
{ | |
"authorization": { | |
"sudo": { | |
"groups": ["adm", "wheel"], | |
"users": ["ubuntu"], |
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
pcm.dmixer { | |
type dmix | |
ipc_key 1024 | |
ipc_key_add_uid false | |
ipc_perm 0660 | |
slave { | |
pcm "hw:0,3" #HDMI, defaults to 48000 kHz | |
channels 2 | |
period_size 1024 | |
buffer_size 4096 |
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
pcm.!default { | |
type plug | |
slave { | |
# pcm "hw:1,0" #delete the first hash for sound over analog | |
# pcm "hw:1,1" #delete the first hash for sound over optical | |
pcm "hw:0,3" #delete the first hash for sound over hdmi | |
rate 48000 | |
} | |
} |
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
openssl genrsa -out /etc/ssl/private/test.key 2048 | |
openssl req -new -key /etc/ssl/private/test.key -out /etc/ssl/private/test.csr | |
openssl x509 -req -extensions v3_req -days 365 -in /etc/ssl/private/test.csr -signkey /etc/ssl/private/test.key -out /etc/ssl/certs/test.pem | |
openssl req -text -noout -in /etc/ssl/private/test.csr | |
root@jx:/etc/ssl/private# openssl req -text -noout -in /etc/ssl/private/test.csr | |
Certificate Request: | |
Data: | |
Version: 0 (0x0) | |
Subject: C=US, ST=California, L=La Jolla, O=grevi.ch, CN=grevi.ch/[email protected] |
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
gst-launch -e videomixer name=mix ! filesink location=test.mp4 \ | |
filesrc location=Video.mov ! decodebin name=decode1 decode1. ! videobox border-alpha=0 top=-320 left=-640 ! mix. \ | |
filesrc location=Slides.mov ! decodebin name=decode2 decode2. ! videobox border-alpha=0 top=0 left=0 ! mix. |
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 'rubygems' | |
require 'ap' # Awesome Print | |
require 'net-http-spy' # Print information about any HTTP requests being made | |
%w{wirble what_methods}.each { |lib| require lib } | |
# %w{what_methods}.each { |lib| require lib } | |
%w{init colorize}.each { |message| Wirble.send(message) } |
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 Scraper | |
class Google | |
include Capybara::DSL | |
Capybara.app_host = "http://www.google.com" | |
def search(query="I love Ruby!") | |
visit('/') | |
wait = 0 unless wait | |
sleep(wait) |
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
# Write a program that prints the numbers from 1 to 100. But for multiples of three | |
# print "Fizz" instead of the number and for the multiples of five print "Buzz". | |
# For numbers which are multiples of both three and five print "FizzBuzz". | |
def fb | |
(1..100).each do |n| | |
case | |
when n%3 == 0 && n%5 == 0 | |
puts "FizzBuzz" | |
when n%5 == 0 |
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 'roo' | |
def find_and_update_abstract(updated_data) | |
abstract = Abstract.find(updated_data[0]).update_attributes(poster_number: updated_data[1], session: updated_data[2]) | |
end | |
def load_and_import_data | |
imported_data = Roo::Excelx.new("/Users/jjg/Desktop/abstract_assignments_revised_check.xlsx") | |
i = 1 |
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 'celluloid/autostart' | |
module PIFRecord | |
PIFRECORD_ROOT = File.expand_path('.') | |
Dir[File.join(PIFRECORD_ROOT,"lib/pif_record/*.rb")].each {|file| require file } | |
# Handle the input, this would probably run some method | |
# as a part of the DSL you'd have to create. Place this | |
# repl as your command line interface to your service. | |
end |
OlderNewer