Skip to content

Instantly share code, notes, and snippets.

@pbrit
pbrit / README.adoc
Last active April 1, 2021 03:00
Apple build machine performance test instructions

Setup

Wikipedia-iOS

brew install xcbeautify
brew install gh
gh repo clone wikimedia/wikipedia-ios
cd wikipedia-ios && git checkout cf727dfb2f3d51b728f6b1fe313eb66105df7a99
### Keybase proof
I hereby claim:
* I am pbrit on github.
* I am pchechetin (https://keybase.io/pchechetin) on keybase.
* I have a public key whose fingerprint is A751 56DE F270 7AD3 9CDF 2B47 E58F 9420 A6A8 904C
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am paulche on github.
* I am pchechetin (https://keybase.io/pchechetin) on keybase.
* I have a public key ASCQCa8qNZPA5_9H8F5uoAgSQm9QD5MaQkAni9RYT8blbAo
To claim this, I am signing this object:
# brew list -l
total 0
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 ack
drwxr-xr-x 5 paulche staff 170 Jan 18 12:52 ansible
drwxr-xr-x 3 paulche staff 102 Jan 31 17:18 apache-spark
drwxr-xr-x 3 paulche staff 102 Jun 10 23:20 atk
drwxr-xr-x 3 paulche staff 102 Aug 16 2015 augeas
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 autoconf
drwxr-xr-x 3 paulche staff 102 Aug 15 2015 automake
drwxr-xr-x 3 paulche staff 102 Aug 16 2015 bind
brew list -l
drwxr-xr-x 3 user staff 102 Jun 19 09:39 ack
drwxr-xr-x 3 user staff 102 Jun 19 16:10 augeas
drwxr-xr-x 3 user staff 102 Jun 19 09:19 boost
drwxr-xr-x 3 user staff 102 Jun 19 15:32 cmake
drwxr-xr-x 3 user staff 102 Jun 19 16:11 drip
drwxr-xr-x 3 user staff 102 Jun 19 09:39 findutils
drwxr-xr-x 3 user staff 102 Jun 19 09:17 freetype
drwxr-xr-x 3 user staff 102 Jun 19 09:22 gcc5
drwxr-xr-x 3 user staff 102 Jun 19 15:31 gdbm
@pbrit
pbrit / Vagrantfile
Created October 13, 2015 08:23
libvirt-vagrant Vagrant example
# -*- mode: ruby -*-
# vi: set ft=ruby :
# NETWORKS: 10.0.10/24 - 10.0.20/24
# PXE: 10.0.10/24
# Management: 10.0.11/24
# Public: 10.0.12/24
# Storage: 10.0.13/24
# Fuel Admin: 10.0.14/24
@pbrit
pbrit / resolver.rb
Created September 30, 2015 10:47
Tool for /etc/hosts update
require 'resolv'
# Alter /etc/hosts leveraging Augeus
# 1. Find /files/etc/hosts/$x/canonical with needed
# |
# |---- Found: 2.1 Check ip
# |
# |---- Not found: 2.2 Create node
node_start = 1
@pbrit
pbrit / gist:69a96bdb079a50b01216
Created May 22, 2015 11:51
hash_join_dnsmasq
# Put in $module/lib/puppet/parser/functions/hash_join_dnsmasq.rb
module Puppet::Parser::Functions
newfunction(:hash_join_dnsmasq, :type => :rvalue, :arity => 2, :doc => <<-EOS
Take hash and string, join them for dnsmasq.
EOS
) do |arguments|
hash = arguments[0]
ip = arguments[1]
@pbrit
pbrit / hash_detect
Created May 19, 2015 10:43
Puppet func, lookups array of hashes by key and value
# Put in $module/lib/puppet/parser/functions/hash_detect.rb
module Puppet::Parser::Functions
newfunction(:hash_detect, :type => :rvalue, :doc => <<-EOS
Take array of hashes and key and value for search and optional key whom value should be returned.
EOS
) do |arguments|
haystack = arguments[0]
require 'md5'
module Puppet::Parser::Functions
newfunction(:file_tree_hash, :type => :rvalue, :arity => 1, :doc => <<-EOS
Returns MD5 has for given prefix. It travers file tree recursively.
EOS
) do |arguments|
prefix = arguments[0]
content = Dir .glob("#{prefix}/**/*") \