Skip to content

Instantly share code, notes, and snippets.

View tisba's full-sized avatar
🚀
Perf Testing all the Things!

Sebastian Cohnen tisba

🚀
Perf Testing all the Things!
View GitHub Profile
@tisba
tisba / self_contained_rspec.rb
Created October 27, 2022 06:18
Self-contained, one-file RSpec
# frozen_string_literal: true
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "rspec"
end
require "rspec/autorun"
@tisba
tisba / gist:6191aca022e288e102cb5db1a55d7377
Created April 23, 2021 22:29
Ruby 3.0.1 on aarch64-linux (via Docker on M1)
This file has been truncated, but you can view the full file.
# Run via: docker run -it --rm ruby:3.0.1 bash
root@d31e08f95470:/# gem install libv8-node
Fetching libv8-node-15.14.0.0.gem
Building native extensions. This could take a while...
ERROR: Error installing libv8-node:
ERROR: Failed to build gem native extension.
current directory: /usr/local/bundle/gems/libv8-node-15.14.0.0/ext/libv8-node
/usr/local/bin/ruby -I /usr/local/lib/ruby/3.0.0 -r ./siteconf20210423-8-a7kacm.rb extconf.rb
#!/usr/bin/env bash
# Build CouchDB 1.0.1 from source using build-couchdb. All needed dependencies
# are also build from source and form a self-contained installation. Specifiy
# COUCHDB_PREFIX to the location where you would like to have everything
# installed to.
# When everything is done, the init.d-script and default settings for CouchDB
# are linked to the right places, the bind address is set to 0.0.0.0 and CouchDB
# will be started, so you can relax!
@tisba
tisba / README.md
Created December 28, 2016 10:16 — forked from blackjid/README.md
How configure your raspberry pi with dashing to have a awesome dashboard

Raspberry pi dashboard

This is what we did to setup a few dashboards at platanus

You'll need

  • Raspberry Pi
  • Dashing Service
  • Wifi stick (optional)
@tisba
tisba / big.log
Created January 29, 2014 10:33
Debug log for RVM issue (https://github.com/wayneeseguin/rvm/issues/2582), output of: time /usr/local/bin/zsh -c "rvm_trace_flag=1; source $HOME/.rvm/scripts/rvm" 2>&1 | tee big.log
+/Users/basti/.rvm/scripts/base:28> [[ -z 5.0.5 ]]
+/Users/basti/.rvm/scripts/base:35> export __array_start rvm_path
+/Users/basti/.rvm/scripts/base:40> [[ -n 5.0.5 ]]
+/Users/basti/.rvm/scripts/base:41> __array_start=1
+/Users/basti/.rvm/scripts/base:45> (( 0 == 0 ))
+/Users/basti/.rvm/scripts/base:47> [[ -n 022 ]]
+/Users/basti/.rvm/scripts/base:48> rvm_rvmrc_files=( /etc/rvmrc /Users/basti/.rvmrc )
+/Users/basti/.rvm/scripts/base:49> [[ -n /Users/basti ]]
+/Users/basti/.rvm/scripts/base:49> [[ /Users/basti/.rvmrc -ef /Users/basti/.rvmrc ]]
+/Users/basti/.rvm/scripts/base:50> rvm_rvmrc_files+=( /Users/basti/.rvmrc )
-module(elasticsearch).
-export([autocomplete/1, autocomplete/0,
search/1, search/0,
start/0,
stop/0,
loop/1]).
-on_load(start/0).
%% Return an autocomplete request
autocomplete() ->
@tisba
tisba / 00_routes.rb
Last active December 30, 2015 04:29
I want to change "edit_user_registration_path" to "benutzer/einstellungen" (from "benutzer/edit" now). How can I do that? What is the key in "path_names" I have to set?
devise_for :users, path: 'benutzer',
path_names: {
sign_in: "anmelden",
sign_up: "registrieren",
sign_out: "abmelden",
edit: "einstellungen"
}
@tisba
tisba / ruby-ssl-rvm-issues.md
Last active December 26, 2015 10:09
Ruby 2.0.0 RVM OS X 10.9 SSL Issue (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError))
/Users/basti/.rvm/rubies/ruby-2.0.0-p247/bin/ruby -S rspec spec/unit/api_spec.rb spec/unit/callbacks_spec.rb spec/unit/complex_example_spec.rb spec/unit/event_spec.rb spec/unit/initial_state_spec.rb spec/unit/inspection_spec.rb spec/unit/localizer_spec.rb spec/unit/memory_leak_spec.rb spec/unit/new_dsl_spec.rb spec/unit/persistence/active_record_persistence_spec.rb spec/unit/persistence/mongoid_persistance_spec.rb spec/unit/simple_example_spec.rb spec/unit/state_spec.rb spec/unit/subclassing_spec.rb spec/unit/transition_spec.rb
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's default settings.
-- create_table("gates", {:force=>true})
-> 0.0091s
-- create_table("readers", {:force=>true})
-> 0.0022s
-- create_table("writers", {:force=>true})
-> 0.0022s
-- create_table("transients", {:force=>true})