Skip to content

Instantly share code, notes, and snippets.


Alfredo Serafini seralf

View GitHub Profile
seralf / Vagrantfile
Last active February 23, 2020 15:43 — forked from malev/Vagrantfile
Vagrantfile: Ubuntu with miniconda 2 installed and working
View Vagrantfile
Vagrant.configure(2) do |config| = "ubuntu/trusty64" "private_network", ip: ""
config.vm.provision "shell", inline: <<-SHELL
apt-get update -q
su - vagrant
wget -q -O
chmod +x
./ -b -p /home/vagrant/miniconda
echo 'export PATH="/home/vagrant/miniconda/bin:$PATH"' >> /home/vagrant/.bashrc
seralf / MainIgnite.scala
Last active February 28, 2023 17:33
Naive Mock for JDBC in scala
View MainIgnite.scala
package examples
import java.sql.DriverManager
import db.jdbc.JDBC
import com.typesafe.config.ConfigFactory
object MainIgnite extends App {
// SEE:
seralf / index.html
Last active January 20, 2019 00:19
exp 01
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>TESTING for RDF!</title>
<script src="" charset="utf-8"></script>
<style type="text/css">
View gist:c5deb711c36e9bca60dd6373b5b6a13c

Useful Commands

Get kubectl version

kubectl version

Get cluster info:

kubectl cluster-info


EMAIL tools

counting the number of messages in a MBOX:

$ grep "From" {MBOX} | wc -l
seralf / ng_debug.html
Created July 28, 2016 21:46
code snippet for prototyping a simple angular debug component
View ng_debug.html
<!-- initialize ng-app ... -->
<!-- debug -->
<section id="debug" ng-controller="debugCtrl">
#debug {
padding: 1em;
background: #DDD;
seralf /
Created July 7, 2016 10:18 — forked from isaacs/
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
seralf / classes_usage.scala
Last active March 29, 2016 23:02
examples with simple Scala "bean" classes
View classes_usage.scala
package examples.scala.php
object MainProve extends App {
Predef println "Hello world!"
val p1 = new Person1("John", "Doe")
val p2 = new Person2("John", "Doe")
seralf / MinimalHTTPServer.scala
Last active March 28, 2016 04:44
minimal scala HTTP server (proof of concept, for courses)
View MinimalHTTPServer.scala
package scala.examples.web
import java.util.concurrent.Executors