Skip to content

Instantly share code, notes, and snippets.

@redestructa
redestructa / TablePrinter.php
Created February 13, 2019 10:42
The table Printer class has no dependencies and generates an array out of an object array
<?php
/**
* The table Printer class has no dependencies and generates an array (strings)
* out of an object array / countable and the child properties that should be printed given by an array (strings)
*/
class TablePrinter
{
/**
* @param \Countable|array|object[] $historyItems
@flabbergastedbd
flabbergastedbd / html_png_polyglot.py
Last active January 16, 2024 09:27
A simple fun python script written to hide actual payload in image pixels and adding the loader to a PNG file.
# Simple script to have fun with PNG+HTML polyglot
# WARNING: This script is not optimised and just written for fun
#
# Author : Bharadwaj Machiraju
#
# Requirements: Pillow
#
# http://blog.tunnelshade.in/2015/06/stegosploit-fun.html
import re
@thatarchguy
thatarchguy / vpnwidget.lua
Created October 21, 2014 23:58
Awesomewm vpn widget
-- add this to your rc.lua, or include it as a dependency
-- Don't forget to add this to the layout section:
-- right_layout:add(vpnwidget)
vpnwidget = wibox.widget.textbox()
vpnwidget:set_text(" VPN: N/A ")
@jewelsea
jewelsea / MovementEventsDemo.java
Created January 19, 2013 00:31
JavaFX sample of moving a shape around on the screen in response to key and mouse presses.
import javafx.animation.TranslateTransition;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.input.*;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;