Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sabcio's full-sized avatar

Sebastian Wojtczak sabcio

View GitHub Profile
@sabcio
sabcio / mashForm.js
Created November 26, 2015 18:22
react this.refs is {}
class MashForm extends React.Component{
constructor(props){
super(props)
this.state = {malts: []}
}
componentDidMount() {
this._fetchIngredients()
}
@sabcio
sabcio / gist:0067456c38e5448118be
Created February 18, 2015 10:43
Diff mariadb cookbook
diff --git a/templates/default/my.cnf.erb b/templates/default/my.cnf.erb
index 5f4f737..fcc41da 100644
--- a/templates/default/my.cnf.erb
+++ b/templates/default/my.cnf.erb
@@ -323,6 +323,12 @@ skip-show-database
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem
+<% if node['mariadb'].key?('options') -%>
+<% node['mariadb']['options'].each { |key, value| -%>
@sabcio
sabcio / gist:b8fca9d9194c10bed361
Created December 15, 2014 11:58
influxdb warn/errors
[2014/12/15 12:55:46 CET] [EROR] (github.com/influxdb/influxdb/api/graphite.(*Server).Serve:120) GraphiteServer: Accept: %!(EXTRA *errors.errorString=use of closed network connection)
[2014/12/15 12:55:46 CET] [WARN] (github.com/influxdb/influxdb/api/graphite.(*Server).ServeUdp:140) GraphiteServer: Error when reading from UDP connection use of closed network connection
@sabcio
sabcio / config.js
Created October 29, 2014 07:57
Grafana config file
///// @scratch /configuration/config.js/1
// == Configuration
// config.js is where you will find the core Grafana configuration. This file contains parameter that
// must be set before Grafana is run for the first time.
///
define(['settings'],
function (Settings) {
return new Settings({
@sabcio
sabcio / Gemfile
Last active August 29, 2015 14:06
Simple Rack application to server static content
source :rubygems
gem 'rack'
gem 'rake'
gem 'thin', group: :production
@sabcio
sabcio / gist:35783b5dcc043177c6cf
Created July 9, 2014 09:29
shelly install of a fresh setup
➜ ~ rvm use ruby-2.0.0-p451@test
Using /Users/sebek/.rvm/gems/ruby-2.0.0-p451 with gemset test
➜ ~ gem list
*** LOCAL GEMS ***
bundler (1.6.1, 1.5.2)
bundler-unload (1.0.2)
executable-hooks (1.3.1)
@sabcio
sabcio / gist:e09ba01899602e34d957
Created July 7, 2014 09:01
whisper to influxdb - using graphite-api to render graphs
#!/usr/bin/python
# based on https://github.com/damaex17/whisper-to-influxDB
# adjusted to graphite-api data format
from influxdb import InfluxDBClient
import argparse
import whisper
import os
import time
@sabcio
sabcio / app.rb
Created April 10, 2014 08:32
require 'sinatra' on jruby 1.7.11
require 'jruby/profiler'
profile_data = JRuby::Profiler.profile do
require 'sinatra'
end
profile_printer = JRuby::Profiler::GraphProfilePrinter.new(profile_data)
profile_printer.printProfile(STDOUT)
@sabcio
sabcio / gist:8419310
Created January 14, 2014 14:41
Rakefile
namespace :db do
task :migrate do
Rake::Task['ar:migrate'].invoke
end
namespace :schema do
task :load do
Rake::Task['ar:schema:load'].invoke
end
end
@sabcio
sabcio / gist:6106900
Last active December 20, 2015 09:19
Trying out emberJS
App = Ember.Application.create();
App.Store = DS.Store.extend({
revision: 12,
adapter: "DS.RESTAdapter"
});
controller (coffee):
App.ApplicationController = Ember.Controller.extend(
mainPages: App.Page.find