Skip to content

Instantly share code, notes, and snippets.

View millsoft's full-sized avatar
🔵
while 1

Michael Milawski millsoft

🔵
while 1
  • Millsoft
  • Germany
View GitHub Profile
@millsoft
millsoft / hello.txt
Created March 3, 2016 16:06
Hello World
This is just a friendly hello world.
sincerely.
Michael.
@millsoft
millsoft / 0_reuse_code.js
Created October 13, 2016 19:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@millsoft
millsoft / github.txt
Last active October 14, 2016 12:59
Git Passwort speichern (Credentials) so dass man danach nicht mehr abgefragt wird.
Globale Git Einstellungen bearbeiten:
git config --global -e
Git credentials für 1 Stunde zwischenspeichern:
git config --global credential.helper 'cache --timeout 3600'
@millsoft
millsoft / soap_server.txt
Last active February 7, 2017 14:18
PHP Soap Server
https://github.com/marcj/php-rest-service
@millsoft
millsoft / keybase.md
Created February 9, 2017 11:11
keybase.md

Keybase proof

I hereby claim:

  • I am millsoft on github.
  • I am milmike (https://keybase.io/milmike) on keybase.
  • I have a public key ASDb35tN7W9gVrG253oeQ_AIp8LZI3bqywgDDIrAAT_5Xgo

To claim this, I am signing this object:

@millsoft
millsoft / nonblocking.php
Created July 25, 2017 15:16
Run php script in own thread without blocking the caller
<?php
$cmd = 'nohup nice -n 10 php -f longprocess.php > log_from_caller.txt & printf "%u" $!';
$pid = shell_exec($cmd);
@millsoft
millsoft / Config.php
Last active August 20, 2017 10:52
A simple Configuration Class for loading and saving to local config.json file.
<?php
/**
* Configuration
*/
class Conf{
public static $configFile = "config.json";
private static $currentConfig = array();
@millsoft
millsoft / erm_main_and_subevents.php
Created January 23, 2018 19:33
Events mit Subevents - sortiert nach start DESC.
<?php
$d = new Db($conf);
$sql = <<<sql
SELECT id,name_de, id_events__parent, start
FROM events
WHERE isArchived != 1
ORDER BY id_events__parent,id,start
@millsoft
millsoft / subl
Created April 16, 2018 17:51
Run sublime text and bring it to foreground (subl alternative)
#!/bin/sh
exec /opt/sublime_text/sublime_text "$@"
wmctrl -ia `wmctrl -l | tail -n 1 | awk '{print $1}'`
@millsoft
millsoft / fineuploader_chunk_combiner.php
Last active June 4, 2018 07:53
Eine Alternative zum Chunk Merger für Fineploader.
<?php
//Alternativer Merger der mit Linux Funktionen die Chunks zusammenfügt.
//Wegen Domainfactory - denn dort kann man mit den Standard-Funktionen von fineuploader nur max. 2 GB große Dateien erstellen...
error_reporting(E_ALL);
ini_set('display_errors', 1);
set_time_limit(0);