Skip to content

Instantly share code, notes, and snippets.

View criess's full-sized avatar

Christoph Rieß criess

  • Carl Finance
  • Berlin
View GitHub Profile
class CreateOverrideRedirectGroup < ActiveRecord::Migration
GROUP_NAME = "Redirect Override"
PERMISSION_NAME = "Redirect Override"
PERMISSION_KEY = "redirect_override"
PERMISSION_DESC = "Disable Redirects for Cms Users"
def up
# create group
group = Cms::Group.new :name => GROUP_NAME, :group_type => Cms::GroupType.where("cms_access = true").first
#!/usr/bin/env ruby
if !defined?(Rails)
$stdout << "must be executed in rails environment via runner: rails r <script>" << "\n"
exit 1
end
require "tenancy_export_helper"
templates = %w(
This file has been truncated, but you can view the full file.
TFVLU7q+AAFhZXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHh0cy1wbGFpbjY0AAAAAAAA
AAAAAAAAAAAAAAAAAAAAc2hhMjU2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAQCAn
daQmh8x6P7i2XHISRlr+hBuI9igsi+tdBN4i6vEIPeHCviCoLAVurl4qDdsRDiJgi1UAAFP8YjY3
NDEwZGItOGEyYi00YjhlLTk5YWMtN2ZlYWMyM2E2YWY1AAAAAAAA3q0AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAPoACscfMABYhtHkt1P3YcFnqnKylJDZxPJxu8B5gN
/LTerWg0xwrIi2wAAAIAAAAPoAAA3q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAP4AAAPoAAA3q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwAAAP
oAAA3q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfoAAAPoAAA3q0AAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAngAAAPoAAA3q0AAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvYAAAPoAAA3q0AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
# Generated by LVM2 version 2.02.171(2)-RHEL7 (2017-05-03): Tue Oct 17 13:51:45 2017
contents = "Text Format Volume Group"
version = 1
description = "Created *after* executing 'vgcfgbackup vglvm'"
creation_host = "localhost.localdomain" # Linux localhost.localdomain 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64
creation_time = 1508241105 # Tue Oct 17 13:51:45 2017
#!/usr/bin/env ruby
require 'rubygems'
require 'active_support/all'
require 'yaml'
require 'i18n'
require 'net/http'
require 'digest/sha1'
# from rails 3.2 framework
@criess
criess / whgsue-berlin.txt
Created January 6, 2018 10:48
Wohnungen Berlin (Suche 2017)
www.berlinovo.de
www.deutsche-annington.de
www.berlinerwohnline.de
www.gsw.de
www.degewo.de
www.bbg-eg.de
www.baywobau.de
www.gesobau.de
www.evmberlin.de
www.hws-berlin.de
require 'digest'
require 'yaml'
require_relative 'randomer.rb'
count = ARGV.find do |arg|
arg.match(/count=/)
end.to_s.scan(/[0-9]+/)[0].to_i
mode = ARGV.find do |arg|
arg.match(/mode=/)
File.open("selling.csv","w") do |f|
f.write("selling_key;selling_value;order_id;order_date;order_state;order_product\n")
f.write(
ConcernExtensionEntry.where(:value => %w[0 1]).
where("created_at > ?", Date.new(2018,1,31).end_of_day).
where("created_at < ?", Date.new(2018,4,1).beginning_of_day).
where("`key` LIKE ?", "selling_%").
map do |ce|
t = Tenancy.find(ce.target_id)
"#{ce.key};#{ce.value};#{t.id};#{t.updated_at};#{t.state};#{t.product}"

Mentoring P2P (2018-06-13)

Christina de Vries https://itacs.de

  • two mentoring tools will be shown

OpenSource Option 1

  • Ad-Hoc Mentoring with the Case Clinic
  • solve a problem n 70 min
  • Tool is avaiable online
  • u.lab 1x on Youtube
#!/usr/bin/env bash
export BUILD_DIR=$(pwd)
export RBENV_ROOT="$BUILD_DIR/.rbenv"
if [ ! -d .rbenv ]; then
git clone https://github.com/rbenv/rbenv.git .rbenv
git clone https://github.com/rbenv/ruby-build.git .rbenv/plugins/ruby-build
else
cd $RBENV_ROOT