Skip to content

Instantly share code, notes, and snippets.

View alessandro-aglietti's full-sized avatar

Alessandro Aglietti alessandro-aglietti

View GitHub Profile
@alessandro-aglietti
alessandro-aglietti / convert_m4b.sh
Created June 12, 2022 11:13 — forked from nitrag/convert_m4b.sh
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)
#
#
@alessandro-aglietti
alessandro-aglietti / v8.md
Last active January 16, 2019 14:16 — forked from kevincennis/v8.md
V8 Installation and d8 shell usage

Installing V8 on a Ubuntu 16.04 LTS

Prerequisites

  • sudo apt-get install python-pkgconfig to avoid https://bugs.chromium.org/p/v8/issues/detail?id=6638
  • Install depot_tools
    • git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • sudo nano ~/.bash_profile
    • Add export PATH=/path/to/depot_tools:"$PATH" (it's important that depot_tools comes first here)
  • source ~/.bash_profile

Keybase proof

I hereby claim:

  • I am alessandro-aglietti on github.
  • I am aqquadro (https://keybase.io/aqquadro) on keybase.
  • I have a public key ASDBiYhvcrBxMcwquRyvYjmGAVR8eOuhqS1BhT5HtOhhcQo

To claim this, I am signing this object:

@alessandro-aglietti
alessandro-aglietti / Operating Ropsten Ethereum testnet.md
Created January 14, 2018 14:28 — forked from andreafspeziale/Operating Ropsten Ethereum testnet.md
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

@alessandro-aglietti
alessandro-aglietti / query_create_response.json
Last active November 26, 2017 19:19
Oraclize API query create response
{
"result": {
"_timestamp": 1511723944,
"daterange": [
1511723944,
1511724004
],
"interval": 3600,
"actions": [],
"id": "39fb23c6f05af7f3cb86ab9f35093ad0a93db451864cdc8abbfcba5a5f8c99e6",
@alessandro-aglietti
alessandro-aglietti / daemon.json
Last active December 5, 2016 08:56
Taming dnsmasq and Docker containers, an Ubuntu 16.04 LTS story
{
"dns": ["172.17.0.1"]
}
@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
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDUhR3AD_X-uR3XveT8O6BOme-W_uHz2Vs">
</script>
<script type="text/javascript">
<link rel="import" href="../bower_components/polymer/polymer.html">
<script src="../js/snap.svg-min.js"></script>
<script src="../js/jquery-1.11.2.min.js"></script>
<polymer-element name="proto-element">
<template>
<div class="div2">
Source:<input type="text" id="textsrc" value="SOURCE"><br>
Destination: <input type="text" id="textdest"><br> Flight:<input
type="text" id="textplane"><br>
</div>
package so;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.IOUtils;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;