Skip to content

Instantly share code, notes, and snippets.

One pomodoro after another

Francesco Casula fracasula

One pomodoro after another
Block or report user

Report or block fracasula

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fracasula /
Last active Nov 16, 2019
Lenovo Legion Y540 configuration for Debian 10 (buster) with kernel 5.2

This is a WIP

  • Use rufus to create USB pen to avoid "Detect and mount CDROM issue"
  • Disable Discrete graphics and UEFI from the BIOS
  • Download the WLAN firmware from here
  • Login as root in recovery mode
  • Install the WLAN firmware downloaded before and reboot, you should now be able to connect via Ethernet (not WiFi)
  • Re-enable the release file in /etc/apt/sources.list in case it was disabled
  • Add your user to the sudoers (e.g. usermod -aG sudo francesco)
  • Enable all repositories contrib non-free in /etc/apt/sources.list (see here)
fracasula / encrypt_decrypt.go
Last active Nov 12, 2019
A simple example with Golang that uses AES-128 to encrypt and decrypt messages.
View encrypt_decrypt.go
package mycrypto
import (
View flattenArray.js
const flattenArray = input => {
if (!Array.isArray(input)) {
throw new Error("Input must be an array")
let result = []
for (let element of input) {
if (Array.isArray(element)) {
result = result.concat(flattenArray(element))
} else {
fracasula / cond.go
Created Aug 3, 2018
GoLang: How to use sync.Cond
View cond.go
package main
import (
func main() {
lock := sync.Mutex{}
fracasula / context_cancel.go
Last active Oct 15, 2019
GoLang exiting from multiple go routines with context and wait group
View context_cancel.go
package main
// Here we show how to properly terminate multiple go routines by using a context.
// Thanks to WaitGroup we'll be able to end all go routines gracefully before the main function ends.
import (
fracasula / keymap.cson
Created Mar 8, 2018
My Atom keymap file
View keymap.cson
'ctrl-d': 'editor:delete-line'
'ctrl-y': 'editor:duplicate-lines'
'ctrl-w': 'core:close'
fracasula /
Last active Oct 28, 2019
How to install Bluejeans on Ubuntu
sudo apt install alien -y
sudo alien --scripts bluejeans_1.28.9-2_amd64.rpm # or whatever is the file you downloaded from the bluejeans website
sudo dpkg -i bluejeans_1.28.9-2_amd64.deb
cd /lib/x86_64-linux-gnu
sudo ln -s
# now you can launch bluejeans
fracasula / proxy.js
Last active Apr 1, 2019
Node.js basic example for proxy to http server
View proxy.js
* Once this is running open your browser and hit http://localhost
* You'll see that the request hits the proxy and you get the HTML back
'use strict';
const net = require('net');
const http = require('http');
fracasula / xdebug
Last active Sep 26, 2017
PHP Xdebug script for having debugging features available quickly on demand
View xdebug
# Copy this file on /usr/loca/bin/xdebug and test your PHP configuration with "xdebug -i | grep -i xdebug"
-dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` \
-dxdebug.remote_enable=On \
-dxdebug.remote_connect_back=On \
-dxdebug.remote_port=9000 \
fracasula / .bash_aliases
Last active Mar 8, 2018
Colourful bash
View .bash_aliases
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
# wget -O ~/.git-completion.bash
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
# wget -O ~/
You can’t perform that action at this time.