Skip to content

Instantly share code, notes, and snippets.

View stereosupersonic's full-sized avatar

MICE Portal stereosupersonic

View GitHub Profile
@stereosupersonic
stereosupersonic / pre-commit.sh
Created September 20, 2017 08:51
pre-commit prevent master commits
#!/bin/bash
echo -e "[PREVENT] --> init (wait a second)"
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ $BRANCH == master ]; then
echo -e "[PREVENT] --> Non shall commit to master!"
exit 1
else
echo -e "[PREVENT] --> Prevent commit approved"
@stereosupersonic
stereosupersonic / pre-push.sh
Created September 20, 2017 08:40
rubocop git hook pre-push
#!/bin/sh
echo "pre-push"
echo "Starting rubocop"
bundle exec rubocop
if [ $? -ne 0 ]; then
echo ""
echo ""
echo "Rubocop failed; push aborted!"
{
"user": {
"athlete_profile": {
"gender": "m",
"height": 179,
"weight": 85,
"age": 46,
"goals": ["improve_endurance", "relieve_stress", "burn_fat"],
"skills": ["pullups", "muscleups", "strict_hs_pushups", "toes_to_bar"],
"limitations": [],
AgeGroup performance_class count
Child untrained 44
Child novice 28
Child intermediate 22
Child proficient 10
Child advanced 1
Young subpar 6
Young untrained 373
[{"user":{"athlete_profile":{"sex":"m","height":160,"weight":61,"age":28,"goals":["improve_endurance","lose_weight","gain_strength"],"skills":["pistols","pullups","toes-to-bar","strict-hs-pushups"],"limitations":[],"fitness_level":75,"desired_training_days":5,"coach_week":118,"country":"Deutschland","training_spot":"München"},"training_data":[{"workout_slug":"bw_iris","performance":1549,"performed_at":"2013-03-05T09:58:11.000Z","exertion_rate":null,"exertion_preference":null,"technique":null,"training_type":"free"},{"workout_slug":"bw_iris","performance":1536,"performed_at":"2013-03-06T12:04:23.000Z","exertion_rate":null,"exertion_preference":null,"technique":null,"training_type":"free"},{"workout_slug":"bw_situp","performance":null,"performed_at":"2013-03-06T12:10:50.000Z","exertion_rate":null,"exertion_preference":null,"technique":null,"training_type":"free"},{"workout_slug":"bw_pushup","performance":null,"performed_at":"2013-03-06T12:13:24.000Z","exertion_rate":null,"exertion_preference":null,"technique":n
{
"user": {
"athlete_profile": {
"sex": "m", # possible values m,f,u
"height": 160, # in cm
"weight": 61, # kg
"age": 27,
"goals": [
"improve_endurance",
"general_fitness",

Keybase proof

I hereby claim:

  • I am stereosupersonic on github.
  • I am michaeldeimelde (https://keybase.io/michaeldeimelde) on keybase.
  • I have a public key ASAN0I1Fv73CG7ctPUy65cZmS_UJSNAvOilQT8eNrJfZhgo

To claim this, I am signing this object:

id name
1 Huber
2 Mai
class Flservice::CoreUser::User < OpenStruct
PATH = "/v1/profile"
def self.find(uid)
response = connection(uid).get PATH
self.new JSON.parse(response.body)["user"].except("authentications")
end
def self.connection(uid)
url = "http://0.0.0.0:3000" # TODO RemoteApp.new(:core_user)
@stereosupersonic
stereosupersonic / kill_sidekiq_job.rb
Last active March 15, 2016 17:48
kill a sidekiq job by class
require 'sidekiq/api'
# kill queued jobs
queue = Sidekiq::Queue.new("default")
queue.each do |job|
if job.item["wrapped"] == "OptivoSyncJob"
puts "kill #{job.item["jid"]}"
job.delete
end
end