Skip to content

Instantly share code, notes, and snippets.

View dhardtke's full-sized avatar

Dominik Hardtke dhardtke

View GitHub Profile
@dhardtke
dhardtke / generate_cer_zips.py
Last active June 9, 2016 19:15
Simple Python 3 script that generates zip files for submission for the tu darmstadt informatik moodle's CER course
#!/usr/bin/env python3
__author__ = "Dominik Hardtke"
__license__ = "MIT"
__version__ = "1.0.0"
__email__ = "dominik@hardtke.me"
__status__ = "Production"
import os
import shutil
import zipfile
@dhardtke
dhardtke / gist:4d89db4d2f4a1017622f
Created February 5, 2015 17:58
Start Wireshark capturing on Fritz!Box devices and stream it using Python's subprocess-module to wireshark
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import subprocess
import requests
import http.client
from http.client import HTTPConnection
from xml.dom import minidom
@dhardtke
dhardtke / CustomAssetPipelineController
Last active January 2, 2016 07:49
Controller to send appropriate caching headers to clients. Use it like this in your config.php of AssetPipeline: 'controller_action' => 'CustomAssetPipelineController@file'
<?php
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Codesleeve\AssetPipeline\Asset;
class CustomAssetPipelineController extends BaseController
{
/**
* Returns a file in the assets directory
*
* @return \Illuminate\Support\Facades\Response