Skip to content

Instantly share code, notes, and snippets.

View skull-squadron's full-sized avatar
💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s

🏴‍☠️ skull-squadron

💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s
  • (stealth)
  • ATX
  • 18:06 (UTC -06:00)
View GitHub Profile
@skull-squadron
skull-squadron / reading-list.md
Last active February 21, 2023 17:46
Language design reading list
@skull-squadron
skull-squadron / google.crt
Last active April 9, 2017 17:24
Am I smoking crack or does VERIFY_PEER plain not work on 1.8.7 and 1.9.3?
#!/usr/bin/env ruby
require 'openssl'
require 'uri'
require 'net/http'
url = URI.parse 'https://rubygems.org/'
http = Net::HTTP.new url.host, url.port
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
http.read_timeout = 20
@skull-squadron
skull-squadron / gist:5021854
Created February 23, 2013 23:34
list all installed package groups on el redhat / fedora
yum grouplist | sed -n '1,/^Installed Groups:/d;/^Available Groups:/q;s/^ *//g;p'
@skull-squadron
skull-squadron / iso_from_files_and_folders.sh
Last active December 12, 2015 02:59
turn files and folders into an iso (put this into an applescript)
vol_name="`basename \\"$1\\"`"
iso="$vol_name.iso"
counter=1
while [ -e "$iso" ]; do
counter=$[counter+1]
iso="$vol_name $counter.iso"
done
hdiutil makehybrid -iso -joliet -o "$iso" "$@"
@skull-squadron
skull-squadron / New Folder From Selection.applescript
Last active December 12, 2015 01:08
New Folder From Selection (Service that works with 1+ files instead of 2+)
on run {input, parameters}
tell application "Finder"
set thePath to first item of input
set {dispName, nameExt, isHidden} to the {displayed name, name extension, extension hidden} of thePath
if isHidden or nameExt is equal to "" then
dispName
else
@skull-squadron
skull-squadron / gist:2038710
Created March 14, 2012 19:05
ansi 256 color swatch sample in ruby
#!/usr/bin/env ruby
#
# Usage: 256swatch [-b [foreground [test pattern]]]
#
# option description default
# -----------------------------------------------------------
#
# -b print background swatches instead normal
#
# foreground force foreground (decimal) normal
@skull-squadron
skull-squadron / fix_rvm_permissions.sh
Created March 13, 2012 22:50
fix rvm permissions
#!/bin/sh
find ~/.rvm -type d -print0 | xargs -0L1 chmod 0755
find ~/.rvm -type f -print0 | xargs -0L1 chmod 0644
find ~/.rvm -type f -print0 | xargs -0L1 file | grep ' exec' | cut -d: -f1 | tee /dev/stderr | xargs -L1 chmod 0755
@skull-squadron
skull-squadron / require_profiling__custom_require.rb
Created March 12, 2012 19:18
hacking up custom_require to show library load times. (HINT: This is silly, use a debugger!)
# Usage: MRI put at the top of custom_require.rb
#
# ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
# This is crappy/untested proof-of-concept code, do not use it in production. It will fail.
# Unlikely to be threadsafe either.
# Don't run this on anything you care about.
# No warranties, express or implied. GPL v3 license.
if ENV['RBDEBUG_REQUIRE'] && !ENV['RBDEBUG_HIDE']
patched /Volumes/Users/barry/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb to show requires, loads and imports. RBDEBUG_REQUIRE shows, RBDEBUG_HIDE hides
rubygems ...
absolute_time (stats bypassed 1)
rubygems/version (stats bypassed 1)
rubygems/requirement (stats bypassed 1)
rubygems/version (stats bypassed 1)
rubygems/version (stats bypassed 1)
rubygems/deprecate (stats bypassed 1)
rubygems/platform (stats bypassed 1)
rubygems/deprecate (stats bypassed 1)
@skull-squadron
skull-squadron / gist:2023444
Created March 12, 2012 17:15
Time yer loads and requires
# Usage: MRI put at the top of custom_require.rb
#
# ~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb
# This is crappy/untested proof-of-concept code, do not use it in production. It will fail.
# Unlikely to be threadsafe either.
# Don't run this on anything you care about.
# No warranties, express or implied. GPL v3 license.
if ENV['RBDEBUG_REQUIRE'] && !ENV['RBDEBUG_HIDE']