Skip to content

Instantly share code, notes, and snippets.

View mindreframer's full-sized avatar
🎯
Focusing

Roman Heinrich mindreframer

🎯
Focusing
View GitHub Profile
@mindreframer
mindreframer / s3-downloader.rb
Created January 17, 2013 00:21
S3 downloader (signed URL)
# encoding : utf-8
#!/usr/bin/env ruby
require 'openssl'
require 'digest/sha1'
require 'base64'
require 'date'
require 'uri'
class S3; end
class << S3
@mindreframer
mindreframer / cleanup_rails_views.rb
Created July 26, 2012 01:13
Cleanup views with tidy (erb)
require 'tidy'
#Tidy.path = '/opt/local/lib/libtidy.dylib' # or where ever your tidylib resides
Tidy.path = '/usr/lib/libtidy.A.dylib'
def generate(files)
tidy = Tidy.open(:show_warnings=>true) do |tidy|
tidy.options.indent = 'auto'
tidy.options.show_body_only = true
tidy.options.output_xhtml = true
@mindreframer
mindreframer / install.md
Last active June 1, 2022 20:05
Lunchy OSX

Lunchy: OSX launchctl wrapper

https://github.com/sosedoff/lunchy-go

# install it
wget http://dl.bintray.com/sosedoff/generic/0.1.0_darwin_amd64.zip
unzip 0.1.0_darwin_amd64.zip
mv lunchy /usr/local/bin/
@mindreframer
mindreframer / instructions.md
Last active April 29, 2020 11:47
Installing POP OS

Fresh Pop OS installation:

WIFI

  • install wifi drivers sudo apt install firmware-b43-installer

Chrome

  • install chrome
@mindreframer
mindreframer / hex-packages.md
Last active August 13, 2019 17:31
Elixir - Dealing with nested datastructures (validating / traversing / transforming)
@mindreframer
mindreframer / adjustowner.sql
Created July 11, 2019 14:46
Change owner for a Postgres DB (all relations)
- https://stackoverflow.com/questions/1348126/modify-owner-on-all-tables-simultaneously-in-postgresql
-- I like this one since it modifies tables, views, sequences and functions owner of a certain schema in one go (in one sql statement), without creating a function
DO $$DECLARE r record;
DECLARE
v_schema varchar := 'public';
v_new_owner varchar := 'bn_redash';
text_var1 varchar := '';
text_var2 varchar := '';
text_var3 varchar := '';
BEGIN
@mindreframer
mindreframer / create_files.rb
Created April 3, 2015 12:35
Benchmark Static Site Generators
#!/usr/bin/env ruby -wKU
require 'yaml'
class Generator
def run
300.times do |i|
File.open(name(i), 'w') do |f|
f.puts Article.new.content
end
end
@mindreframer
mindreframer / daily_standup_replacement.md
Last active August 30, 2018 09:48
Productivity for Teams with Trello + iDoneThis (daily email reports)

Alternative To Daily Standup

Google turned periodic email updates as a process into a scalable management solution, leveraging technology, through automation, data storage and data retrieval. An individual’s Snippets are transparent across the organization and are linked to an individual’s internal resume in its MOMA system which connects individual employees to the work of team members and others within the company. It can kill political squabbles, the core problem of people management, by providing a record of what’s been done.

Put differently, Snippets is a management process that scales because transparency means that individual engineers can manage themselves and individual engineers can manage each other without having to go through a middleman. It’s the disruptive power of peer-to-peer for management centered around atomic units of work.

Silicon Valley’s focus of work around the work itself is still an ongoing