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/bash | |
# | |
# This script should allow for selenium to be run on a headless Fedora box and connect to a hub server | |
# | |
# Author: Fotios Lindiakos (fotios at redhat.com) | |
EPHEMERAL_DIR="/usr/local/bin" | |
SELENIUM_DIR="/usr/lib/selenium" | |
HUB_SERVER="http://ec2-107-20-156-96.compute-1.amazonaws.com:4444" |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Parameters": { | |
"PublicSubnet": { | |
"Description": "Subnet ID for use by all public agent nodes", | |
"MaxLength": "18", | |
"ConstraintDescription": "must be a valid CIDR.", | |
"Default": "0.0.0.0/0", | |
"AllowedPattern": "^([0-9]+\\.){3}[0-9]+\\/[0-9]+$", | |
"MinLength": "9", |
- Moose: A Guide to the New Revolution
- dl.google.com: powered by Go
- Build Your Own PaaS
- Exploiting your File System to Build Robust & Efficient Workflows
- Kicking Impostor Syndrome In the Head
- Giving LWP::UserAgent Its Well Deserved Golden Watch
- Carton: Manage CPAN dependencies without the mess
- Discrete Math You Need to Know
- GitHub Power Tools
Faraday's so convenient Ruby HTTP client library
The development of the API wrapper [RestClient gem] or I [rest_client_gem]
What you need for OAuth was using [Net / HTTP] [net_http] + [OAuth gem] the [oauth_gem]
After reading the source of the API library [Twitter gem] and [twitter_gem] [Instagram gem] such as [instagram_gem]
Thing [Faraday gem] that [faraday_gem] had been commonly used
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
#!/usr/bin/env ruby | |
all_user_procs = %x[/bin/ps -e -o uid,pid | /bin/egrep "^\s+[0-9]{3,4}"] | |
pids_by_user = all_user_procs.lines.inject(Hash.new{|h,k| h[k] = []}) do |h,line| | |
(uid,pid) = line.split.map(&:to_i) | |
h[uid] << pid | |
h | |
end |
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
#!/usr/bin/env ruby | |
all_user_procs = %x[/bin/ps -e -o uid,pid | /bin/egrep "^\s+[0-9]{3,4}"] | |
pids_by_user = all_user_procs.lines.inject(Hash.new{|h,k| h[k] = []}) do |h,line| | |
(uid,pid) = line.split.map(&:to_i) | |
h[uid] << pid | |
h | |
end |
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
(str, err, rc = ::OpenShift::Runtime::Utils::oo_spawn('cgsnapshot 2> /dev/null') | |
keys = %w(cpu.cfs_period_us cpu.cfs_quota_us cpuacct.usage) | |
Hash[str.scan(/^group\sopenshift\/(.*?)\s(.*?)^}/m).map{|mg| [mg[0], Hash[mg[1].scan(/\s*(#{keys.join('|')})\s*=\s*"(.*)";/).map{|k,v| [k,v.to_i]}]] }] |
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
4.2.2 |