Skip to content

Instantly share code, notes, and snippets.

@trillerpfeife
trillerpfeife / API.md
Created May 2, 2018 12:56 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@trillerpfeife
trillerpfeife / aldi_markets_es.json
Created January 21, 2018 11:59
Aldi Markets in Spain
{
"tiendas":[
{
"codigo":"SIS14",
"nombre":"Aldi Sagunto (Valencia)",
"direccion":"Av. Advocat Fausto Caruana, 371. Parque Comercial L’Epicentre",
"latitude":39.6715966,
"longitude":-0.2510453,
"link":"https://plus.google.com/110844690934113004108/about?hl=es",
"localidad":"Sagunto",
@trillerpfeife
trillerpfeife / debian-cpuminer-multi-installer.sh
Created December 2, 2016 11:12
cpuminer-multi installer script with language reconfiguration
#!/bin/bash
echo install cpuminer-multi
locale-gen en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@trillerpfeife
trillerpfeife / game.js
Created June 9, 2016 12:55
game shissel
var currentMap = new Image(),
mrBrown = new Image();
lastMap = new Image();
currentMap.src = 'res/010/010-010.png';
mrBrown.src = "res/mr_brown.gif";
var canvas = document.createElement('canvas');
canvas.width = 320;
@trillerpfeife
trillerpfeife / extendmethod.js
Last active June 6, 2016 14:21
Extends a object method with a function, requires underscore.js
var obj = {
init: function() {
console.log("init old");
}
};
var old_obj = {};
_.extend(old_obj, obj);
@trillerpfeife
trillerpfeife / gist:e698950e8620fe9f3b760de3c41f0970
Last active May 31, 2016 20:21
How To Configure SSH Key-Based Authentication on a Linux Server
on client:
ssh-keygen
ssh-copy-id username@remote_host
Disabling password authentication on server:
edit /etc/ssh/sshd_config
-> PasswordAuthentication no
service ssh restart
voilá
Every 2,0s: cat /proc/mdstat Thu Apr 21 15:57:58 2016
Personalities : [raid1]
md0 : active raid1 sdb1[0] sda1[1]
312438784 blocks super 1.2 [2/2] [UU]
[=================>...] resync = 88.7% (277137600/312438784) finish=15.4min speed=38042K/sec
bitmap: 1/3 pages [4KB], 65536KB chunk
unused devices: <none>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@trillerpfeife
trillerpfeife / oeamttogeojson.js
Created April 15, 2016 01:37
geojson converter for oeamtc.at array
var oldGeo = [{
'name': 'Wels',
'address': '',
'number': '',
'zip': '4600',
'city': 'Wels',
'lat': '48.19043815',
'lon': '14.07081485',
'urls': [{
'cat': 'Raststationen',