Skip to content

Instantly share code, notes, and snippets.

View BobuSumisu's full-sized avatar

Øyvind Ingvaldsen BobuSumisu

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bobusumisu on github.
  • I am bobusumisu (https://keybase.io/bobusumisu) on keybase.
  • I have a public key ASC4CjwBevQkb7P61ooNNoKzlJBga7KJik6miij9vRLU2go

To claim this, I am signing this object:

// ==UserScript==
// @name Wowhead Items TSM
// @namespace http://github.com/BobuSumisu
// @version 0.1
// @description Easy TSM Import from Wowhead Item Lists
// @author Øyvind Ingvaldsen <oyvind.ingvaldsen@gmail.com>
// @match http://www.wowhead.com/items=*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
@BobuSumisu
BobuSumisu / gist:6713484
Created September 26, 2013 12:29
ec mapping, "prettified"
{
"kibana-int":{
"temp":{
"properties":{
"dashboard":{
"type":"string"
},
"group":{
"type":"string"
},
@BobuSumisu
BobuSumisu / gist:6713467
Created September 26, 2013 12:28
ES mapping
{"kibana-int":{"temp":{"properties":{"dashboard":{"type":"string"},"group":{"type":"string"},"title":{"type":"string"},"user":{"type":"string"}}},"dashboard":{"properties":{"dashboard":{"type":"string"},"group":{"type":"string"},"title":{"type":"string"},"user":{"type":"string"}}}},"logstash-2013.09.25":{"logs":{"properties":{"@timestamp":{"type":"date","format":"dateOptionalTime"},"@version":{"type":"string"},"host":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"},"type":{"type":"string"}}}},"logstash-2013.09.26":{"logs":{"properties":{"@timestamp":{"type":"date","format":"dateOptionalTime"},"@version":{"type":"string"},"agent":{"type":"string"},"auth":{"type":"string"},"bytes":{"type":"string"},"clientip":{"type":"string"},"coords":{"type":"double"},"geoip":{"properties":{"city_name":{"type":"string"},"continent_code":{"type":"string"},"country_code2":{"type":"string"},"country_code3":{"type":"string"},"country_name":{"type":"string"},"ip":{"type":"string"},"latitude":{"type":"double"}
@BobuSumisu
BobuSumisu / Angular newline list directive
Last active December 21, 2015 19:28
A simple AngularJS directive for newline separated lists. Works much like the ngList directive but with newlines instead of commas.
module.directive('ngListNewline', function() {
return {
restrict: 'A',
require: 'ngModel',
link: function(scope, element, attr, ngModel) {
ngModel.$parsers.push(function(text) {
return text.split('\n').filter(function(x) { return x.trim().length > 0 });
});
ngModel.$formatters.push(function(array) {
* Juss24
** Backend
*** Slim
The project uses the microframework [[http://slimframework.com][Slim]].
Every request is rewritten to =index.php=. In this file a Slim Application object is instantiated
called =$app=.
To create a route simple call =$app->VERB()=
where =VERB= is a HTTP Request method (=get=, =post=, =put= or =delete=).
To create a generic route use =map()=.
@BobuSumisu
BobuSumisu / adm.js
Created August 16, 2012 08:37
front-end-kode til et lite adminpanel (IN PROGRESS)
function setup() {
$.ajaxSetup({
url: 'php/ajax.php',
type: 'post',
dataType: 'json',
beforeSend: function() {
$('#ajax_loader').dialog({ modal: true });
},
@BobuSumisu
BobuSumisu / gist:1605307
Created January 13, 2012 09:43
asteroids 0.1
window.onload = function() {
Crafty.load(["../../Pix/ship1.png", "../../Pix/bullet.png"], function () {
init();
});
function init() {
Crafty.init(WIDTH, HEIGHT);
// Crafty.canvas.init();
@BobuSumisu
BobuSumisu / gist:1415615
Created December 1, 2011 10:22
jqplot problem
$.jqplot(container, [data], {
seriesDefaults: {
renderer: $.jqplot.BarRenderer,
rendererOptions: {
barPadding: 0,
barMargin: 0,
barWidth: 10
},
},
axes: {
@BobuSumisu
BobuSumisu / Current (working) Xorg.conf
Created October 5, 2011 20:39
Nvidia Drivers Failed
Section "Device"
Identifier "Default Device"
Option "NoLogo" "True"
EndSection