Skip to content

Instantly share code, notes, and snippets.

View haslo's full-sized avatar
<peon>work work</peon>

Gwen Gloor haslo

<peon>work work</peon>
View GitHub Profile
@haslo
haslo / yosemite.md
Last active August 29, 2015 14:07
Yosemite Stuff
@haslo
haslo / model_with_json_data.rb
Last active August 29, 2015 14:08
Getters and Setters for JSON Data Fields for ActiveRecord Models
module Concerns
module ModelWithJSONData
extend ActiveSupport::Concern
module ClassMethods
def json_data_field_descriptions
[]
end
end
@haslo
haslo / yml_export.rb
Last active October 26, 2016 12:26
Export locale files from YAML to CSV, for further processing by clients
#!/usr/bin/env ruby
require 'yaml'
require 'deep_merge'
require 'find'
require 'spreadsheet'
def process_hash(translations, current_key, hash)
hash.each do |new_key, value|
combined_key = [current_key, new_key].delete_if { |k| k == '' }.join(".")
@haslo
haslo / gist:43a8abd5cff600094cef
Created July 10, 2015 09:49
CSV-Export DB from Ruby / PostgreSQL
# inspired by: https://github.com/oxon/logistaegvm/blob/master/lib/tasks/export.rake
# required gems:
# * pg
# * rubyzip
unless ARGV.count == 1
puts 'Required argument: Output directory'
exit 1
end
[alias]
cheat = !git add -A && git commit --amend -C HEAD && git push -f
branchdates = !git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate) %(authorname) %(refname:short)'
deletemerged = !git branch --merged | grep -v '^* master$' | grep -v '^ master$' | xargs git branch -d
cleanup = !git checkout master && git pull && git deletemerged && git branch
[log]
decorate = full
[color]
ui = true
@haslo
haslo / unity_proxy.md
Last active August 24, 2020 21:10
Proxy for Tabletop Simulator's Unity HTTPS problems
@haslo
haslo / json_export.rb
Last active October 26, 2016 12:26
Exports a nested JSON into an Excel, to send to clients for translations
#!/usr/bin/env ruby
require 'json'
require 'spreadsheet'
def process_hash(translations, current_key, hash)
hash.each do |new_key, value|
combined_key = [current_key, new_key].delete_if { |k| k == '' }.join(".")
if value.is_a?(Hash)
process_hash(translations, combined_key, value)

Clip-to-Zero (CTZ)

What is this

This is a semi automatically generated summary, made by CyberGwen with assistance of Python, BeautifulSoup, ChatGPT o1 and Claude Sonnet 3.5. The summary does not try to be complete, and leaves out many of the points in the original (like a detour about the good and bad aspects of true peak limiting, or the places CTZ has been implemented successfully) that might or might not be essential. If you want the full experience, go to the source by Baphometrix: