Skip to content

Instantly share code, notes, and snippets.

MacOS

Install

  • https://tea.xyz/teabase
  • Brew
  • Rosetta 2 softwareupdate --install-rosetta --agree-to-license
  • Bare Minimum:
    • brew install ghostty zellij nnn macfuse helix
    • brew install cursor google-chrome github

Keybase proof

I hereby claim:

  • I am paaloeye on github.
  • I am paaloeye (https://keybase.io/paaloeye) on keybase.
  • I have a public key ASB0ve50sHcKeQFvg8_aDuSFxZsxlMayhwEo2CTwDK5DdAo

To claim this, I am signing this object:

@paaloeye
paaloeye / 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
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
@paaloeye
paaloeye / 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
@paaloeye
paaloeye / 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
# 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]
@paaloeye
paaloeye / 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}/**/*") \
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/