Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am marchrius on github.
  • I am marchrius (https://keybase.io/marchrius) on keybase.
  • I have a public key whose fingerprint is 4D58 6729 4E67 8AC7 B0C5 CA9C BC90 5688 7987 1E01

To claim this, I am signing this object:

@marchrius
marchrius / Example.java
Last active Jul 28, 2020
Maps builder utility
View Example.java
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import org.marchirus.utils.Maps;
public class Example { public static void main(String[] args) {
Maps.Builder<String, String> builder = Maps.builder();
builder.pair("Key1", "Value1")
.key("Key2").value("Value2")
View nebular-ionicons.ts
import * as ion from 'ionicons/icons';
import {NbIcons} from "@nebular/theme/components/icon/icon-pack";
function map(icon: string) {
return icon.replace('data:image/svg+xml;utf8,', '');
}
export const NbIonIcons: NbIcons = {
'add': map(ion.add),
'add-circle': map(ion.addCircle),
View bash_to_zsh_history.js
const fs = require('fs');
/**
* This script transfers bash history to zsh history
* Change bash and zsh history files, if you don't use defaults
*
* Usage: node bash_to_zsh_history.js
*
* Author: Matteo Gaggiano
*/
View slack-black-theme.css
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
@marchrius
marchrius / example.php
Created Oct 12, 2017
Visit object with a path (object and array)
View example.php
<?php
include_once __DIR__ . '/helpers.php';
$data = ((object)[
"name" => "Matteo",
"surname" => "Gaggiano",
"age" => 25,
"github" => ((object)[
"username" => "Marchrius",
@marchrius
marchrius / checkport.sh
Last active Apr 22, 2017
checkport - check if one or more TCP ports are opened
View checkport.sh
#!/bin/bash
#
# Created by: Matteo Gaggiano on 22/04/2017
# Base script by: stojg at https://gist.github.com/stojg/70a15a84900da72ff2b5
#
# Changelog 22/04/2017 :
# - Added support for multi-port check
#
function usage() {
@marchrius
marchrius / port-check.sh
Created Apr 22, 2017 — forked from stojg/port-check.sh
port-check.sh - small script to check if TCP ports are opened through firewalls etc.
View port-check.sh
#!/bin/bash
function checkport {
if nc -zv -w30 $1 $2 <<< '' &> /dev/null
then
echo "[+] Port $1/$2 is open"
else
echo "[-] Port $1/$2 is closed"
fi
}
View jquery.classyloader.min.js
/*!
* jQuery ClassyLoader
* www.class.pm
*
* Written by Marius Stanciu - Sergiu <marius@class.pm>
* Licensed under the MIT license www.class.pm/LICENSE-MIT
* Version 1.1.0
*
*/(function(d){d.fn.ClassyLoader=function(a){a=d.extend({},{
width:200,