Skip to content

Instantly share code, notes, and snippets.

View fallenhitokiri's full-sized avatar

Timo Zimmermann fallenhitokiri

View GitHub Profile
//
// UDPListener.swift
//
// Created by Michael Robert Ellis on 12/16/21.
//
import Foundation
import Network
import Combine
@fallenhitokiri
fallenhitokiri / views.py
Created June 8, 2012 12:00
blog-tumblelog-5
from django.shortcuts import render_to_response
from django.template import RequestContext
from tumblelog.models import Entry, Tag
def tag(request, pid):
ci = RequestContext(request)
tmpl = {}
@fallenhitokiri
fallenhitokiri / models.py
Created June 8, 2012 11:49
blog-tumblelog-4
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db.models.signals import post_save
class Tag(models.Model):
name = models.CharField(max_length=400, unique=True)
@fallenhitokiri
fallenhitokiri / models.py
Created June 8, 2012 11:40
blog-tumblelog-3
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db.models.signals import post_save
class Entry(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')
@fallenhitokiri
fallenhitokiri / models.py
Created June 8, 2012 11:31
blog-tumblelog-2
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
class Entry(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')
#!/usr/bin/env python
# This is an example Git server. http://blog.nerds.kr/post/106956608369/implementing-a-git-http-server-in-python
# Stewart Park <stewartpark92@gmail.com>
from flask import Flask, make_response, request, abort
from StringIO import StringIO
from dulwich.pack import PackStreamReader
import subprocess, os.path
from flask.ext.httpauth import HTTPBasicAuth

Keybase proof

I hereby claim:

  • I am fallenhitokiri on github.
  • I am fallenhitokiri (https://keybase.io/fallenhitokiri) on keybase.
  • I have a public key whose fingerprint is CCBF B645 FAC8 8BFD C5D7 DF90 423E C3A0 4B45 68CE

To claim this, I am signing this object:

https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
http://hosts-file.net/ad_servers.txt
http://winhelp2002.mvps.org/hosts.txt
https://adaway.org/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
@fallenhitokiri
fallenhitokiri / go.rice-mux
Last active September 24, 2017 11:18
using go.rice and gorilla mix together
router := mux.NewRouter()
box := rice.MustFindBox("static")
staticFileServer := http.StripPrefix("/static/", http.FileServer(box.HTTPBox()))
router.Handle("/static/{path:.*}", loggingHandler(staticFileServer))
@fallenhitokiri
fallenhitokiri / foo.apib
Last active February 25, 2016 20:55
api blueprint example how to plueprint
FORMAT: 1A
# Foo API
API for Foo
# Group Foo
Foo API
## Login [/api/login]
Authenticate user and returns api token for use in subsequent requests.