A comprehensive reference for Omarchy - an opinionated Arch Linux + Hyprland setup by DHH.
| Shortcut | Function |
|---|
| #!/bin/bash | |
| set -e | |
| CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
| hex=$((cat <<EOF | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> |
| #!/bin/ruby | |
| require 'json' | |
| require 'optparse' | |
| require 'net/http' | |
| require 'pry' | |
| require 'yaml' | |
| auth_token = ENV['SCALEWAY_AUTH_TOKEN'] | |
| uri = URI('https://api.scaleway.com/servers') |
| // Usage: | |
| // Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread | |
| // then use as follows: | |
| // | |
| // query(term | [term, term, ...], term | [term, term, ...], ...) | |
| // | |
| // When arguments are in an array then that means an "or" and when they are seperate that means "and" | |
| // | |
| // Term is of the format: | |
| // ((-)text/RegExp) ( '-' means negation ) |
| class MemoryCache | |
| DEFAULT_MAX_KEYS = 5000 | |
| attr_reader :data, :max_keys | |
| def initialize(config) | |
| @data = {} | |
| @max_keys = config[:max_cache_keys] || DEFAULT_MAX_KEYS | |
| @lock = Mutex.new |
| brew install homebrew/dupes/apple-gcc42 | |
| rbenv install 1.9.3-p484 | |
| rbenv global 1.9.3-p484 | |
| git clone https://github.com/cowboyd/libv8.git | |
| cd libv8 | |
| git checkout 3.11 | |
| export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 | |
| export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2 | |
| export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2 | |
| bundle install |
| require 'rake' | |
| require 'rake/testtask' | |
| Rake::TestTask.new do |t| | |
| t.test_files = Dir.glob('spec/**/*_spec.rb') | |
| end | |
| task(default: :test) |
| # Disclaimer: this solution has been taken from the post: http://stackoverflow.com/a/5071198/784270 | |
| # navigate to the bundler gem and in lib/bundler/runtime.rb, | |
| # find the line that does Kernel.require and wrap it like this | |
| puts Benchmark.measure("require #{file}") { | |
| Kernel.require file | |
| }.format("%n: %t %r") | |
| # Add |
| This playbook has been removed as it is now very outdated. |
| def valid_json?(value) | |
| JSON.parse value | |
| true | |
| rescue JSON::ParserError, TypeError | |
| false | |
| end |