Skip to content

Instantly share code, notes, and snippets.

🚀
Perf Testing all the Things!

Sebastian Cohnen tisba

🚀
Perf Testing all the Things!
Block or report user

Report or block tisba

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View elasticsearch.erl
-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 Dec 30, 2015
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?
View 00_routes.rb
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 Dec 26, 2015
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))
View gist:7098061
/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})
View 01_tsung_log_request_tags.diff
diff --git i/include/ts_config.hrl w/include/ts_config.hrl
index ceab838..28cbbb2 100644
--- i/include/ts_config.hrl
+++ w/include/ts_config.hrl
@@ -76,7 +76,8 @@
total_popularity = 0, % should be 100 if we use probabilites; sum of all weights if we use weights
use_weights , % true if we use weights instead of probabilities
total_server_weights=0,
- job_notify_port
+ job_notify_port,
View protected_class_methods.rb
class A
class << self
protected
def protected_class_method
puts "I'm a protected class method! Called by #{caller.first}"
end
end
end
class B < A
View gol.exs
defmodule Life do
def run(board) when is_binary(board) do
board |> parse_board |> run
end
def run(board) do
IO.write("\e[H\e[2J")
Life.print_board board
:timer.sleep 1000
board = next_board(board)
View keep-alive-agent.js
"use strict";
var _ = require("underscore")
, ForeverAgent = require("request/forever");
exports.createKeepAliveAgent = function createKeepAliveAgent() {
var agent = new ForeverAgent();
agent.close = function close() {
var self = this;
View riak-js-keep-alive.js
// patch riak-js
var Meta = require("riak-js/lib/meta");
if (!_.contains(Meta.keywords, "agent")) {
Meta.keywords.push("agent");
}
// "use" patch
var options = {}; // set your riak-js options here
View gist:5366459
==> Downloading http://downloads.sourceforge.net/project/justniffer/justniffer/justniffer%200.5.11/justniffer_0.5.11.tar.gz
Already downloaded: /Library/Caches/Homebrew/justniffer-0.5.11.tar.gz
tar xf /Library/Caches/Homebrew/justniffer-0.5.11.tar.gz
==> Patching
/usr/bin/patch -f -p1 -i 000-homebrew.diff
patching file lib/libnids-1.21_patched/configure.gnu
==> ./configure --prefix=/usr/local/Cellar/justniffer/0.5.11
./configure --prefix=/usr/local/Cellar/justniffer/0.5.11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
You can’t perform that action at this time.