Skip to content

Instantly share code, notes, and snippets.

@brantje
brantje / node_exporter_setup.md
Last active March 1, 2024 17:20 — forked from nwesterhausen/node_exporter_setup.md
node_exporter installation on rpi

Installing node_exporter

Steps to install node_exporter

  1. Add user for node_exporter

    sudo useradd --no-create-home --shell /bin/false node_exporter
@brantje
brantje / nginx.conf
Last active January 29, 2023 13:52
Nuxt SPA config
events {
worker_connections 4096; ## Default: 1024
}
http {
server {
listen 80;
server_name localhost;
gzip on;
@brantje
brantje / NimiqX.js
Last active April 1, 2019 07:00
Simple wrapper for NimiqX.
const axios = require('axios')
const instance = axios.create({
baseURL: 'https://api.nimiqx.com/',
params: {
api_key: process.env.NIMIQX_KEY
},
})
let NimiqX = new Proxy({}, {
var api_request = function (endpoint, method, data, callback) {
API.cookies.getAll({url: _API.host}).then(function (cookies) {
if(!cookies){
make_request();
return;
}
if(cookies.length === 0){
make_request();
return;
}
@brantje
brantje / make-build.py
Created January 6, 2017 20:34
This is the release script i use for my passman builds
#!/usr/bin/env python
import os
import subprocess
from xml.dom import minidom
from pprint import pprint
import git
import urllib, json
import re
import wget
import zipfile
"websocket": {
"start_embedded_server": true,
"server_url": "0.0.0.0:4000",
"remote_control": true
}
@brantje
brantje / bbscraper.php
Created January 17, 2016 15:01
postTopicReply function returns The submitted form was invalid. Try submitting again.
<?php
// base class with member properties and methods
class BBScraper
{
var $baseUrl;
private $user;
private $sid;
public $fetchedTopics = array();
public $topicReplys = array();
@brantje
brantje / update-owncloud.sh
Last active August 29, 2015 14:19
Owncloud update & update apps
#!/bin/bash
BRANCH="stable8"
ROOTDIR="$PWD"
WWWUSER="www-data"
WWWGROUP="www-data"
if [ $(id -u) != 0 ]; then
printf "**************************************\n"
printf "* Error: You must run this with sudo. *\n"
printf "**************************************\n"
exit 0
poiTypes = {
shop = ['supermarket','bakery','car','stationery','hairdresser','mobile_phone','convenience','newsagent','kiosk','computer','clothes','variety_store','hearing_aids','florist','handicraft','candle','antique','pet','massage','electronics','laundry','doityourself','sports','jewelry','musical_instrument','chemist','shoes','beverages','toys','fishing','copyshop','beauty','bag','paint','bicycle','communication','furniture','alcohol','deli','optician','books','car_repair','butcher','outdoor','motorcycle','estate_agent','photo','gift','travel_agency','tea','wine','medical_supply','department_store','dry_cleaning','video','second_hand','greengrocer','erotic','curtain','haberdashery','garden_centre','art','fashion','bags','accessoires','confectionery','ice_cream','organic','music','boutique','interior','kitchen','vacant','tattoo','mall','camera','gallery','rc_models','coffee','bicycle_rental','photographer','ticket','charity','Shisha','hats','funeral_directors','locksmith','fabric','hardware','shoe_r
@brantje
brantje / gist:359dcaf5f177789db51d
Created July 24, 2014 13:18
Saving dialog positions
function make_draggable(elements) {
/* Elements is a jquery object: */
elements.draggable({
/* containment: 'parent',*/
start: function (evt, ui) {
ui.helper.css('z-index', ++zIndex);
var zoom = $('#notes').css('zoom');
pointerY = (evt.pageY - $('#notes').offset().top) / zoom - parseInt($(evt.target).css('top'));