Skip to content

Instantly share code, notes, and snippets.

khwz()
Prgm
:"init"
Lbl init
:"Zum IO Fenster wechseln"
Disp ""
:"Alles loeschen"
ClrIO
ClrErr
ClrGraph
@hutt
hutt / gist:fe7a5ddf840abcc06fcd
Created April 26, 2015 17:57
Neuer GnuPG Key.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
# Neuer GnuPG Key
Ich, Jannis Hutt, habe meinen GPG Key gewechselt.
Der alte Key 0xDE982BAE0C8061C8, welcher als Hauptidentität die E-Mail Adresse privat@jannishutt.de nutzte, wird von un an nicht mehr benutzt.
Stattdessen benutze ich von nun an den Key 0x9BAD2EA15BCF1DFF.
@hutt
hutt / XML Language file test
Created November 7, 2012 20:25
XML Language file test for Sharebase lang files
<?xml version='1.0'?>
<lang>
<exp>
<key>upload_file</key>
<tr>Datei hochladen</tr>
</exp>
<exp>
<key>create_file</key>
<tr>Datei anlegen</tr>
</exp>
@hutt
hutt / Redirect international visitors
Created November 10, 2012 21:25
Redirect other-speaking visitors to other directories/websites.
<?php
if(!isset($_COOKIE['lang'])){
$lang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2);
switch($lang) {
case 'de':
$redirect = '/de';break;
case 'en':
$redirect = '/en';break;
default:
$redirect = '/en'; }
@hutt
hutt / Sharebase translation functions
Created November 13, 2012 15:15
Sharebase's translation functions.
function selectLangfile(){
$dir = opendir("sources");
while ($element = readdir($dir)) {
if (($element != '.') && ($element != '..')) {
if ((is_file('sources/'.$element)) && (substr('sources/'.$element, -3) == 'xml')) {
$langfile[] = $element;
}
}
}
closedir($dir);
@hutt
hutt / gist:4326259
Created December 18, 2012 08:49
Sortieralgorithmus (Java)
/**
*
* Nope.
*
* @version 1.0 vom 18.12.2012
* @Jannis Hutt
*/
import java.io.*;
public class sort12zufall {
public static void main(String[] args) throws IOException {

Keybase proof

I hereby claim:

  • I am hutt on github.
  • I am hutt (https://keybase.io/hutt) on keybase.
  • I have a public key ASAfDTiR_0EYNCmkVoFox6ahBKKpTF_vQeCYs6ss-8aESwo

To claim this, I am signing this object:

@hutt
hutt / pushover.sh
Created April 5, 2016 16:07
get notified easily by using pushover on your server.
#!/bin/bash
# Pushover settings
api_key="YOUR_API_KEY"
user_key="YOUR_USER_KEY"
# Logic
if [ -t 0 ]; then
# check for parameters
include reg51.inc
Init: mov A, #11111111b
mov P1, #11111111b; alle Zeilen dauerhaft high, mit Spalten wird Rotation gesteuert
Eins: mov A, #11110111b
Start: mov P0, A; erste Spalte muss low sein, da nur wenn Spalte low und Zeile high ist dann leuchtet Licht
RR A; Akku nach rechts rotieren
mov P0,A; Akku in P0
CJNE A, #0F7h, Start; Vergleiche A mit 1111 0111d wenn ungleich nach Start springen
@hutt
hutt / bot.py
Last active September 11, 2016 23:21
Das Maß ist voll
#!/usr/bin/env python
#coding=UTF-8
#file: bot.py
#
#requirements:
#keys.py
#tweeps ("pip install tweeps")
#
import tweepy, time, sys, random
#from our keys module (keys.py), import the keys dictionary