Skip to content

Instantly share code, notes, and snippets.

View clobrano's full-sized avatar
:octocat:

Carlo Lobrano clobrano

:octocat:
View GitHub Profile
@clobrano
clobrano / fuzz-photo-test.py
Last active December 21, 2015 12:59
Random test exercise for 'Software test' course at Udacity. Here I apply the Charlie Miller python script to try find bugs in linux software to show photos (Gthumb, F-Spot and Shotwell)
#!/usr/bin/env python
# List of files to use as initial seed
file_list = [
'/home/carlo/Immagini/2013/08/15/IMG_20130815_154000.jpg',
'/home/carlo/Immagini/2013/08/15/IMG_20130815_154023.jpg',
'/home/carlo/Immagini/2013/08/15/IMG_20130815_154029.jpg',
'/home/carlo/Immagini/2013/08/15/PANO_20130815_095210.jpg'
]
@clobrano
clobrano / f-spot-crash.txt
Created August 22, 2013 17:10
F-spot crash while fuzz testing it
** Running f-spot in Debug Mode **
** Running Mono with --debug **
[1 Info 19:04:17.425] Initializing Mono.Addins
[1 Debug 19:04:17.654] Mono.Addins Initialization took 0,206363
(f-spot:9665): Gtk-WARNING **: Impossibile trovare il motore del tema in module_path: «pixmap»,
(f-spot:9665): Gtk-WARNING **: Impossibile trovare il motore del tema in module_path: «pixmap»,
(f-spot:9665): Gtk-WARNING **: Impossibile trovare il motore del tema in module_path: «pixmap»,
@clobrano
clobrano / fedora-post-install.sh
Created September 8, 2013 14:13
Post installer script for Fedora 19
#!/bin/bash
# Post installer scritp for Fedora 19
# author: Carlo Lobrano
# e-mail: c.lobrano@gmail.com
# blog: www.bytefalls.com
################################
## Base functions
################################
log()
@clobrano
clobrano / ubuntu-post-install.sh
Last active December 28, 2015 03:49
This is a script to install common utilities on a (K)Ubuntu machine just after installed the OS (Tested on Elementary OS)
#!/bin/bash
Author="Carlo Lobrano"
Email="bytefalls@gmail.com"
Version="2.2"
Date="2014-05-25"
Project="Ubuntu-derived OS post install script"
# Changelog
# 2014-06-07 Added indicator-cpufreq to eos (remember to copy the icons)
# 2014-05-25 Separated package installation from ppa add.
@clobrano
clobrano / todo.vim
Last active August 31, 2015 12:35
Todo.txt VIM syntax highlight
if exists("b:current_syntax")
finish
endif
hi Cyan3 ctermfg=43 guifg=#00d7af "rgb=0,215,175
hi DarkBlue ctermfg=18 guifg=#000087 "rgb=0,0,135
hi DarkGreen ctermfg=22 guifg=#005f00 "rgb=0,95,0
hi DarkMagenta ctermfg=90 guifg=#870087 "rgb=135,0,135
hi DarkOrange ctermfg=208 guifg=#ff8700 "rgb=255,135,0
hi Green3 ctermfg=34 guifg=#00af00 "rgb=0,175,0
# Dockerizing MongoDB: Dockerfile for building MongoDB images
# Based on ubuntu:latest, installs MongoDB following the instructions from:
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
## Usage
## Basic way
## Usage: docker run --name <name for container> -d <user-name>/<repository>
#$ docker run -p 27017:27017 --name mongo_instance_001 -d my/repo
#
## Dockerized MongoDB, lean and mean!
Verifying that "clobrano.id" is my Blockstack ID. https://onename.com/clobrano
@clobrano
clobrano / ws.js
Last active June 27, 2017 14:52
Simple example of WebSocket broadcast (server side)
const WebSocket = require ('ws');
const wss = new WebSocket.Server({host:'localhost', port:'8080'});
wss.broadcast = function (data) {
wss.clients.forEach ( client => {
if (client.readyState === WebSocket.OPEN) {
client.send (data);
}
});
@clobrano
clobrano / ws.html
Created June 27, 2017 14:53
Simple Example of Websocket broadcast (client side)
<html>
<head>
<script>
var ws = new WebSocket('ws://localhost:8080');
ws.onmessage = function (event) {
document.getElementById('result0').value=event.data;
}
</script>
</head>
<body>
@clobrano
clobrano / init.vim
Last active February 7, 2025 08:19
Minimal init.vim/vimrc (mostly for windows)
" Save this file into ~/.config/nvim/init.vim
"
" BASIC SETUP:
syntax enable
filetype plugin on
" FINDING FILES
" Search down into subfolders
set path+=**
set wildmenu