Skip to content

Instantly share code, notes, and snippets.

View bicccio's full-sized avatar

Fabrizio Morroia bicccio

View GitHub Profile
@bicccio
bicccio / index.html
Created September 14, 2018 15:17
JS Bin [add your bin description] // source https://jsbin.com/pemazok
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@bicccio
bicccio / tmux-cheatsheet.markdown
Created January 6, 2018 15:40 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bicccio
bicccio / nickname.md
Created September 2, 2017 04:24 — forked from brigand/nickname.md
Freenode Setting Up Your Nickname

What is the recommended way to set up my IRC nickname?

Please follow these steps to set up your nick and configure your client. Check off each step to make sure it's been done:

Select a permanent, master nickname. If the nickname you want is registered but has expired, just ask a staffer and in most cases, we will be happy to drop it for you.

Please avoid using the name of a community project or trademarked entity, to avoid conflicts. Write down your password and be sure to keep the sheet of paper in a safe place.

Register your IRC nick:

@bicccio
bicccio / inheritance.js
Last active April 29, 2017 00:13
investigate javascript inheritance
var Pet = function (n) {
this.name = n;
this.getName = function() {
return this.name;
}
}
Pet.prototype.getName = function() {
return this.name;
}
@bicccio
bicccio / subdirectory-files-count
Last active February 4, 2017 18:06
count howthe number of files inside each subdirctory
#! /bin/bash
dir=$1
find $dir -type d -maxdepth 1 -mindepth 1 -print0 | while IFS= read -r -d $'\0' line; do
echo "$line"
ls -R "$line" | wc -l
done
@bicccio
bicccio / gist:087307d1cec9fa0466bfa2a673560554
Created November 20, 2016 22:10 — forked from paullewis/gist:1982121
Mergesort in JavaScript
/**
* An implementation for Mergesort. Less efficient
* than Quicksort. Again, you'd just use Array.sort
* but if you found yourself unable to use that
* there's always this option.
*
* Tests with:
*
* var array = [];
* for(var i = 0; i < 20; i++) {
@bicccio
bicccio / webcrawler.js
Created February 6, 2016 21:29 — forked from amoilanen/webcrawler.js
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
@bicccio
bicccio / .tmux.conf
Created January 4, 2014 22:37 — forked from snuggs/.tmux.conf
# SCREENSHOT EXAMPLE: http://grab.by/bzg3
##############################
# _
# | |_ _ __ ___ _ ___ __
# | __| '_ ` _ \| | | \ \/ /
# | |_| | | | | | |_| |> <
# \__|_| |_| |_|\__,_/_/\_\
#
#############################
@bicccio
bicccio / LICENSE.txt
Last active December 15, 2015 14:49 — forked from 140bytes/LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@bicccio
bicccio / find-base64-occurences
Created November 24, 2012 11:11 — forked from anotheremily/find-base64-occurences
hackers seem to like base64 encoding their php commands
#!/bin/bash
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt