Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

MICE Portal stereosupersonic

I may be slow to respond.
Block or report user

Report or block stereosupersonic

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 athlete.json
"user": {
"athlete_profile": {
"sex": "m", # possible values m,f,u
"height": 160, # in cm
"weight": 61, # kg
"age": 27,
"goals": [

Keybase proof

I hereby claim:

  • I am stereosupersonic on github.
  • I am michaeldeimelde ( on keybase.
  • I have a public key ASAN0I1Fv73CG7ctPUy65cZmS_UJSNAvOilQT8eNrJfZhgo

To claim this, I am signing this object:

View core_user_user.rb
class Flservice::CoreUser::User < OpenStruct
PATH = "/v1/profile"
def self.find(uid)
response = connection(uid).get PATH JSON.parse(response.body)["user"].except("authentications")
def self.connection(uid)
url = "" # TODO
stereosupersonic / kill_sidekiq_job.rb
Last active Mar 15, 2016
kill a sidekiq job by class
View kill_sidekiq_job.rb
require 'sidekiq/api'
# kill queued jobs
queue ="default")
queue.each do |job|
if job.item["wrapped"] == "OptivoSyncJob"
puts "kill #{job.item["jid"]}"
View code_warrior_code.rb
# key word arguemtents with options
def foo(a, **b)
foo(1, a: 2, b:3) #=> [1, {:a=>2, :b=>3}]
# === regex
# my solution
def validate_hello(greetings)
View config.rb
MyGem.configure do |config|
# Description of the setting here...
config.setting1 = :value
module MyGem
class Configuration
attr_accessor :setting1, :setting2
View optivo_interface.rb
gem "optivo_api", ">= 0.8.1", github: "freeletics/optivo_api"
require "optivo_api"
OptivoApi.configure do |config|
config.mandator_id = Rails.application.secrets.optivo_api_mandator_id
config.user = Rails.application.secrets.optivo_api_user
View message_verifier.rb
message_verifier = Rails.application.message_verifier("some salt")
token = message_verifier.generate("my versecure thing")
message_verifier.verify(token) # => "my versecure thing"
# more params
token = message_verifier.generate([, email, "some message"])
user_id, email, message = message_verifier.verify(token) # => "my versecure thing"
View listen_dir.rb
require 'listen' #
dir = "/Users/michaeldeimel/entwicklung/freeletics/core-user-rails"
listener = do |modified, added, removed|
puts "modified absolute path: #{modified}"
puts "added absolute path: #{added}"
puts "removed absolute path: #{removed}"
listener.start # not blocking
You can’t perform that action at this time.