Skip to content

Instantly share code, notes, and snippets.

@Shamar
Shamar / bypass-firewall-and-probe-ports.html
Created September 3, 2018 14:19
PoC exploit: bypass a corporate firewall through JavaScript and a DNS
<html>
<!-- This is a very simple Proof of Concepts of just one of the possible attacks
described at https://bugzilla.mozilla.org/show_bug.cgi?id=1487081
You can give it a try by following the instruction at
https://dev.to/shamar/the-meltdown-of-the-web-4p1m
Just please, remember to restore your /etc/hosts after.
-->
<head>
<script type="text/javascript">
@Shamar
Shamar / intelligence.hs
Created March 5, 2018 17:40
A definition of intelligence
type Knowledge = ([Set], [Function])
type Intelligence = (Perception, Knowledge) -> ([Action], Knowledge)
comprehension :: (Perception, Knowledge) -> Knowledge
imagination :: Knowledge -> [Prediction]
will :: [Prediction] -> [Decision]
execution :: ([Decision], Knowledge) ->[Action]
abstraction :: (Perception, Knowledge) -> Knowledge
-- Human Intelligence
@Shamar
Shamar / branch2patch.sh
Created July 28, 2015 00:43
From FeatureBranch to GerritChange
#!/bin/bash
if [ ! -d ".git" ]; then
echo "`pwd` is not a git repo"
exit 3
fi
STATUS=`git status -b --porcelain`
STATUSL=`git status -b --porcelain|wc -l`
BRANCH=`git status -b --porcelain | head -1|tr -d '# '`
@Shamar
Shamar / CounterExample.cs
Last active December 28, 2015 03:19
A generic fluent interface example (too easy to actually require a fluent interface, http://ocramius.github.io/blog/fluent-interfaces-are-evil/).
using System;
using NUnit.Framework;
namespace FluentSample
{
public interface IFluentCounter
{
IFluentCounter Increase();
IFluentCounter Decrease();
@Shamar
Shamar / FLA-Epic.tex
Created September 25, 2011 13:46
Fiduciary License Agreement for Epic.NET
%% Fiduciary License Agreement (Copyright Assignment)
%% adapted to Italian law
%%
%% Language: English
%%
%{{{ Header
\newcommand{\fiduciary}{Giacomo}
\newcommand{\fiduciaryaddress}{\begin{alltt}