Skip to content

Instantly share code, notes, and snippets.

extern crate datetime;
use std::env::args;
use std::{thread, time};
use std::process::Command;
use datetime::{LocalDate, Month, DatePiece};
const MINUTE: u64= 60;
fn main() {
@Akendo
Akendo / svghell.py
Created October 24, 2019 17:00 — forked from majestrate/svghell.py
Generate SVG XML Bomb
#
# svg hell -- xml bomb generator for svg
#
# for educational use
# please don't allow svg on 8ch.net
#
# usage: python svghell.py > evil.svg
#
import random
@Akendo
Akendo / gist:7a1f26bf1bff8e1cedfbc3808c738e4e
Created March 4, 2019 11:46
This scripts will allow you to login on the Webportal for Wifi on ICE
#!/usr/bin/env bash
CSRF_TOKEN=$(curl http://www.wifionice.de/de/|grep -oE 'value="[0-9a-f]{32}"' | cut -d = -f2|sed 's/"//g')
echo $CSRF_TOKEN
# This is what the website is going to request to the backend...
# POST /de/ HTTP/1.1
# Host: www.wifionice.de
# User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
@Akendo
Akendo / wiki.lua
Created September 6, 2017 15:43 — forked from zhzhxtrrk/wiki.lua
pandoc confluence markup writer
-- that is very similar to that of pandoc's HTML writer.
-- There is one new feature: code blocks marked with class 'dot'
-- are piped through graphviz and images are included in the HTML
-- output using 'data:' URLs.
--
-- Invoke with: pandoc -t sample.lua
--
-- Note: you need not have lua installed on your system to use this
-- custom writer. However, if you do have lua installed, you can
-- use it to test changes to the script. 'lua sample.lua' will
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@Akendo
Akendo / netmask_to_cidr.py
Created May 24, 2017 11:23
Converting a netmask to CIDR with vanilla python
def netmask_to_cidr(m_netmask):
return(sum([ bin(int(bits)).count("1") for bits in m_netmask.split(".") ]))
@Akendo
Akendo / review.py
Created May 15, 2017 12:57
review.py
import tasklib.task
# https://tasklib.readthedocs.io/en/latest/#dealing-with-dates-and-time
from datetime import datetime, date, timedelta
tw = tasklib.TaskWarrior("/home/akendo/.task")
ldone_tasks = tw.tasks.filter(status='Completed')
#ldone_tasks[-1]['end']