Skip to content

Instantly share code, notes, and snippets.

View fbentele's full-sized avatar

Florian Bentele fbentele

View GitHub Profile
@fbentele
fbentele / python_numbers.py
Created December 10, 2012 13:22
Calculating some numbers
#! /usr/bin/env python
# F. Bentele, 10.12.2012
# Calculate some inputs
# declare variables
zahl_gelesen = 1
i = 0
summe = 0
while zahl_gelesen:
@fbentele
fbentele / DateTimePicker
Last active December 17, 2015 10:58
HTML Date-Time Picker for Twitter Bootstrap
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 / flac2mp3
Created September 24, 2014 17:43
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'
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void getNextDay(char* input, char* output, int buffersize);
int a2i(const char *s);
/*
// ==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==
<?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>

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:

@fbentele
fbentele / exportxls.php
Created February 9, 2017 13:13
export array to xls
// 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
@fbentele
fbentele / instruction.sh
Created June 16, 2017 09:19
Randomly select a installed printer on macOS
# 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 / stopwatch.gs
Last active August 10, 2018 19:23
Stopwatch Google App Script für Waldi
function startAll() {
startB();
startE();
startH();
startK();
}
function startB(){
startTime("B");
}