Skip to content

Instantly share code, notes, and snippets.

View johanneskonst's full-sized avatar
🎯
Focusing

Johannes Konst johanneskonst

🎯
Focusing
View GitHub Profile

Keybase proof

I hereby claim:

  • I am johanneskonst on github.
  • I am johanneskonst (https://keybase.io/johanneskonst) on keybase.
  • I have a public key ASCerSAip1GpxPv6f8bRKvArm8YRfYNtWUkWKRtf_5uzJQo

To claim this, I am signing this object:

<?php
function atom2list ($url) {
if (false !== filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED | FILTER_FLAG_HOST_REQUIRED | FILTER_FLAG_PATH_REQUIRED)) {
$xml = simplexml_load_file($url);
$items = array();
foreach ($xml->entry as $entry) {
$title = (string) $entry->title;
$link = (string) $entry->link['href'];
$updated = (string) $entry->updated;
@johanneskonst
johanneskonst / whereis.go
Created November 2, 2016 13:20
whereis for windows, finds program.{exe|cmd} in %path%
package main
import "os"
import "strings"
import "fmt"
func main() {
if 2 > len(os.Args) || "" == os.Args[1] {
fmt.Println("Usage: whereis program")
} else {
@johanneskonst
johanneskonst / phps.cmd
Created October 5, 2016 08:41
Easily run PHP's internal webserver on windows.
@ECHO OFF
SETLOCAL ENABLEEXTENSIONS
SET me=%~n0
SET webroot=%cd%
SET port=8080
IF "%~1"=="–FIX_CTRL_C" (
SHIFT
SET ccfix=1
) ELSE (