Skip to content

Instantly share code, notes, and snippets.

Florian Bentele fbentele

View GitHub Profile
@fbentele
fbentele / stopwatch.gs
Last active Aug 10, 2018
Stopwatch Google App Script für Waldi
View stopwatch.gs
function startAll() {
startB();
startE();
startH();
startK();
}
function startB(){
startTime("B");
}
@fbentele
fbentele / instruction.sh
Created Jun 16, 2017
Randomly select a installed printer on macOS
View instruction.sh
# Randomly select a printer every 2 minutes
# This is a simple "load-balancing" printer queue
# Florian Bentele - 2017
# Step 1: Open the Terminal.app (/Applications/Utilities/Terminal.app)
# Check what printer is the Default Printer, enter the following command and hit enter
lpstat -d
# The output should be something like "system default destination: my_printer1"
@fbentele
fbentele / exportxls.php
Created Feb 9, 2017
export array to xls
View exportxls.php
// library needed
// https://github.com/PHPOffice/PHPExcel/
require_once dirname(__FILE__) . '/PHPExcel/Classes/PHPExcel.php';
function make_xls($array){
// Create new PHPExcel object
$objPHPExcel = new PHPExcel();
// Set document properties
View keybase.md

Keybase proof

I hereby claim:

  • I am fbentele on github.
  • I am fbe (https://keybase.io/fbe) on keybase.
  • I have a public key whose fingerprint is E1F9 C5C4 B9E3 FE33 F7F0 100B ED69 D66F D277 2090

To claim this, I am signing this object:

View demo.php
<?php
add_action('media_buttons', 'my_super_function');
function my_super_function(){
?>
<a href="#" id="aid-nf-insert-submission" class="button"><span class="nf-insert-form dashicons dashicons-feedback"></span> Shortcode einfügen</a>
View hostpoint-contract-exporter.js
// ==UserScript==
// @name Export Hostpoint Verträge
// @namespace http://tampermonkey.net/
// @version 0.1
// @description make an export button to export all hostpoint verträge!
// @author fbentele
// @match https://admin.hostpoint.ch/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
View date-calc.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void getNextDay(char* input, char* output, int buffersize);
int a2i(const char *s);
/*
View flac2mp3
#!/bin/bash
# by K-Soft! 05/24/2012 with parts from
# http://bash.cyberciti.biz/multimedia/linux-unix-bsd-convert-flac-to-mp3/
# convert flac to mp3 and writes id3 tags
# usage: flactomp3 /path/to/my/awesome/music/
# requires FLAC, ID3, LAME
# change quality -V 0-9
IFS=$'\t'
@fbentele
fbentele / DateTimePicker
Last active Dec 17, 2015
HTML Date-Time Picker for Twitter Bootstrap
View DateTimePicker
HTML
====
<div id="datetimepicker" class="input-append date">
<input data-format="dd.MM.yyyy - hh:mm" type="datetime" name="starttime" />
<span class="add-on">
<i data-time-icon="icon-time" data-date-icon="icon-calendar" />
</span>
</div>
JavaScript
@fbentele
fbentele / python_numbers.py
Created Dec 10, 2012
Calculating some numbers
View python_numbers.py
#! /usr/bin/env python
# F. Bentele, 10.12.2012
# Calculate some inputs
# declare variables
zahl_gelesen = 1
i = 0
summe = 0
while zahl_gelesen:
You can’t perform that action at this time.