Skip to content

Instantly share code, notes, and snippets.

"ec7d31e9-0892-4066-93f8-1792bd6b8bbb abbiegen"
"c4eeb717-13f8-4bdd-b336-b6f96db485a1 abends"
"84a9ac04-dc88-49ff-a3db-a1d99e69561d abschließen"
"29c94764-c99f-4f93-94bb-5749e2c1ce8d die Ahnung"
"03ef6e17-40dc-4eef-a30e-e8ab0f3e3ed8 aktiv"
"77f583c3-bd8e-4449-97b3-7569c16bc938 aktuell"
"3c5a0e18-ed21-4ebf-af1e-271557fce261 das Album"
"a6c4aa7e-efb7-488c-9fab-8416cebe4497 amerikanisch"
"2577581e-a7e7-42fd-b42f-711259498335 das Angebot"
"0d4aa6b7-bd8d-45bd-a3a4-1379d4dcc6df die Angestellte"
@superplussed
superplussed / file.js
Last active February 28, 2017 13:45
Troubleshooting a serialzr model
// stores are like collections and hold routes
class SentenceStore extends RootStore {
constructor() {
super();
this.config = {
model: Sentence,
deserialize: true,
GET: {
index: '/sentences',
field :job_assignment_histories do
pretty_value do
if bindings[:object].job_assignment_histories.present?
bindings[:view].render(
partial: "job_assignment_histories/table",
locals: {job_assignment_histories: bindings[:object].job_assignment_histories}
)
end
end
end
class @SlideShowController extends RouteController
data: ->
slideNum:
@params.slideNum
module:
Module.findOne({slug: @params.moduleSlug})
lesson:
Lesson.findOne({slug: @params.lessonSlug})
@superplussed
superplussed / dabblet.css
Created April 27, 2013 01:32
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@superplussed
superplussed / dabblet.css
Created April 27, 2013 01:29
dual angled shadow (SO)
/**
* dual angled shadow (SO)
*/
body { padding: 5em; background: whitesmoke; }
.box {
width: 20em; height: 6em;
border: solid 1px #ccc;
position: relative;
background: white;
}
@superplussed
superplussed / run
Created August 24, 2011 16:26
Installs to /etc/sv/chef-client/log/run
#!/bin/bash
exec svlogd -tt ./main
@superplussed
superplussed / run
Created August 24, 2011 16:24
Installs to /etc/sv/chef-client/log/run
#!/bin/bash
exec 2>&1
exec /usr/bin/env chef-client -i 1800 -s 20 -L /var/log/chef/client.log
@superplussed
superplussed / test_ary.c
Created June 28, 2011 17:35
Testing ary functions in C extensions
#include "ruby.h"
#include "stdlib.h"
VALUE TestArray;
VALUE add(VALUE self, VALUE val, VALUE index) {
VALUE rAry;
rAry = rb_ivar_get(self, rb_intern("@rb_ary"));
VALUE *ary_ptr = RARRAY_PTR(rAry);
ary_ptr[NUM2INT(index)] = val;