Skip to content

Instantly share code, notes, and snippets.

View alessandro-aglietti's full-sized avatar

Alessandro Aglietti alessandro-aglietti

View GitHub Profile
@andreafspeziale
andreafspeziale / Operating Ropsten Ethereum testnet.md
Last active March 30, 2022 03:24
Operating Ropsten Ethereum testnet network with Geth and Mist on OSX

Operating Ropsten Ethereum testnet

from a newbie to newbies

Intro

I believe that a development environment is one of the access key in learning new technologies. I didn't find on the internet a simple and common path to make the Ropsten network, the Ethereum public testnet, work.

So I'm writing down a couple of command lines and links that can be useful to achieve it.

Resources and requirements

@nitrag
nitrag / convert_m4b.sh
Last active July 19, 2024 16:04
Audibook convert m4b to mp3. This will split into chaptered mp3 files and automatically reconfigure proper ID3v2 tags.
#!/bin/bash
#
# sudo apt-get install id3v2 ffmpeg
#
# USAGE:
# cd /book title/
# bash ~/this_script_path.sh
# rm *.m4b (you need to manually remove the original in case something goes wrong)
#
#
@calaveraInfo
calaveraInfo / ncatproxy.sh
Last active February 8, 2024 08:35
How to create extremely simple (http) reverse proxy using netcat (nmap flavor) and a named pipe
mkfifo reply
ncat -kl 8765 < reply | ncat 127.0.0.1 4567 > reply # listens on port 8765 and redirects to localhost:4567. Runs until C-c.
rm reply # cleanup after end
@alessandro-aglietti
alessandro-aglietti / messages.md
Created September 18, 2016 08:56 — forked from mottosso/messages.md
A Conversation About OOP vs. FP Turns Constructive

Just tried to put this in a more readable format: https://github.com/svanderbleek/haskellandchill.com/blob/master/a-conversation-about-oop-vs-fp-turns-constructive.md

Person Time Message
sagar 10:47 why is that, why is OOP trash
katychuang 10:48 excellent question
katychuang 10:49 I've been told FP and OOP are different paradigms
katychuang 10:52 I'm going to butcher a quote from a talk by Evie so I'm going to paraphrase… She said something like when you work with OOP you create lots of objects and rules on how they should interact and yet somehow end up having to touch each other a lot and inappropriately
katychuang 10:53 On the other hand FP (especially Haskell) is like working with shapes, like that baby shape fitting toy where you focus more on fitting the type parameters correctly
katychuang 10:56 I think of programming as building a piping system. FP (especia
//Paste this into a chrome console to dump out a list of the search urls on the page
function fixLinksOfClassL() {
// fix old-style class="l" links
var ts = document.getElementsByClassName("l");
for (var i=0; i < ts.length; i++) {
var t = ts[i];
if (t.tagName == "A") {
// remove javascript callback first
t.removeAttribute("onmousedown");
// fix link if necessary
@gerardorochin
gerardorochin / php_error_logstash.conf
Created June 2, 2014 15:39
php error logging into logstash + elasticsearch and trace errors on single line and root path hidden
input {
file {
type => "php-error"
path => "/var/www/error_log"
sincedb_path => "/opt/logstash/sincedb-access"
}
}
@ngpestelos
ngpestelos / remove-docker-containers.md
Last active May 31, 2024 15:10
How to remove unused Docker containers and images

May 8, 2018

I wrote this four years ago, so instead use this command:

$ docker rmi $(docker images -q -f dangling=true)
@zcdziura
zcdziura / Crypto Test
Last active July 13, 2023 05:08
Encryption using Elliptic Curves and Diffie-Hellman key exchanges
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.PublicKey;
@jbenet
jbenet / simple-git-branching-model.md
Last active June 17, 2024 14:53
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@juanje
juanje / gist:3081998
Created July 10, 2012 08:21
A simple Logstash conffile with a custom grok filter
input {
tcp {
type => "linux-syslog"
port => 3333
}
file {
type => "linux-syslog"
path => [ "/var/log/auth.log" ]
}