Skip to content

Instantly share code, notes, and snippets.

I can bearly stand another of your puns

Niklas barning

View GitHub Profile
barning / cssGridForIe.scss
Created Jan 14, 2019
Generating css grid for IE and browsers we really love
View cssGridForIe.scss
@mixin cssGrid {
display: -ms-grid;
display: grid;
@mixin cssGridTemplateCol($input) {
-ms-grid-columns: #{$input};
grid-template-columns: #{$input};
barning / color-tiles.scss
Last active Nov 7, 2018
Color Tile Generator
View color-tiles.scss
$colors: (
primary: #de1c24,
secondary: #d3ffce,
// Generates Colors Tiles automatically. No need to write more SCSS
@each $name, $color in $colors {
&--#{$name} {
.color-tile__color {
background-color: $color;
barning / variant-generation.scss
Created Aug 30, 2018
Generates a list of bem modifiers
View variant-generation.scss
$list: (
xsmall: 12px,
small: 16px,
medium: 24px,
large: 32px
@each $name, $size in $list {
.element--#{$name} {
width: $size;
barning / imagerotator.php
Created Mar 5, 2015
Random Background Image PHP
View imagerotator.php
Version 2.2 - December 4, 2003
Copyright (c) 2002-2003 Dan P. Benjamin, Automatic, Ltd.
All Rights Reserved.
View lines
var ctx = new C2S(width,height);
var poly=[ v2.x, v2.y, v3.x, v3.y, v4.x, v4.y, v5.x, v5.y,v6.x, v6.y ];
ctx.moveTo(poly[0], poly[1]);
for( item=2 ; item < poly.length-1 ; item+=2 ){ctx.lineTo( poly[item] , poly[item+1] )}
//ctx.fillStyle = "rgba(255,255,255,0)";
ctx.strokeStyle = 'rgb('+r+','+g+','+b+')';
ctx.lineWidth = 5;
View savesvg
var downloadAsSVG = function (fileName) {
if(!fileName) {
fileName = "dieflaeche"+second()+minute()+day()+year()+".svg"
var url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(mySVG);
var link = document.getElementById("download"); = fileName;
link.href = url;;
barning / Robot
Created Dec 14, 2014
Unser Roboter
View Robot
class MyRobot extends Robot {
private final float STANDING = 0.0005f;
private float mAngle;
private final Sensor mSensor_front;
private final Sensor mSensor_left;
private final Sensor mSensor_right;
private final Sensor mSensor_back;
barning /
Last active Aug 29, 2015

Keybase proof

I hereby claim:

  • I am barning on github.
  • I am barning ( on keybase.
  • I have a public key whose fingerprint is F6ED 2862 7159 C8B2 CFAB 039C B952 759B 3B50 06A7

To claim this, I am signing this object:

View Level wird hochgezählt und gemalt.
int level;
void restart () {
map = new Map( "karte"+level+".map");
void draw (){
You can’t perform that action at this time.