Skip to content

Instantly share code, notes, and snippets.

View stockmind's full-sized avatar

Simone Roberto Nunzi stockmind

View GitHub Profile
@stockmind
stockmind / 0_reuse_code.js
Created May 29, 2017 00:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@stockmind
stockmind / install.sh
Created June 27, 2017 04:01
GPD Pocket fand service installation instruction
# download gpdfand service files
git clone https://github.com/efluffy/gpdfand.git
cd gpdfand
# use sbin for gpdfand service
sudo sed -i "s/\/usr\/local\/bin\/gpdfand/\/usr\/local\/sbin\/gpdfand/" gpdfand.service
# copy gpd fan service files
sudo cp gpdfand.service /etc/systemd/system/gpdfand.service
@stockmind
stockmind / test_evemu_record.sh
Last active July 14, 2017 02:39
Test evemu-record
#!/usr/bin/env bash
echo "Spawning 11 processes"
for i in {0..11}
do
sudo evemu-record "/dev/input/event$i" "event$i" &
done
#!/bin/bash
# https://natelandau.com/bash-scripting-utilities/
#
# Set Colors
#
bold=$(tput bold)
underline=$(tput sgr 0 1)
reset=$(tput sgr0)
@stockmind
stockmind / myappindicator_v4.py
Created September 5, 2017 17:05 — forked from candidtim/myappindicator_v4.py
Minimal Ubuntu AppIndicator in Python, with custom icon and a "Quit" menu item
import os
import signal
from gi.repository import Gtk as gtk
from gi.repository import AppIndicator3 as appindicator
APPINDICATOR_ID = 'myappindicator'
def main():
indicator = appindicator.Indicator.new(APPINDICATOR_ID, os.path.abspath('sample_icon.svg'), appindicator.IndicatorCategory.SYSTEM_SERVICES)
indicator.set_status(appindicator.IndicatorStatus.ACTIVE)
@stockmind
stockmind / windows-10-hyper-v-enable-and-no-hyper-v-menu-entry.ps1
Last active November 11, 2022 04:02
Enable Hyper-V in Windows 10 and add a No Hyper-V boot entry to Windows boot loader
# Author: Simone Roberto Nunzi aka (Stockmind)
# Date: 2018/01/03
# Purpouse: Enable Hyper-V in Windows 10 and add a No Hyper-V boot entry to Windows boot loader
# References:
# https://blogs.msdn.microsoft.com/virtual_pc_guy/2008/04/14/creating-a-no-hypervisor-boot-entry/
# https://stackoverflow.com/questions/35479080/how-to-turn-windows-feature-on-off-from-command-line-in-windows-10
# https://stackoverflow.com/questions/16903460/bcdedit-bcdstore-and-powershell
#
# Launch PowerShell with administrative rights issuing Windows X + A
@stockmind
stockmind / xrandr-scale.sh
Created March 29, 2018 16:50 — forked from 3v1n0/xrandr-scale.sh
Xrandr Scaling script, with auto panning when scaling down
#!/bin/bash
export LANG=C
output=$1;
scale=$2;
if [ -n "$output" ] && ! (xrandr --listmonitors | grep -qw "$output"); then
echo "Invalid output: '$output'";
exit 1;
#!/usr/bin/env bash
# This script require root privileges
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Parse ARGS
POSITIONAL=()
#!/usr/bin/env bash
# This script require root privileges
if [ $EUID != 0 ]; then
sudo "$0" "$@"
exit $?
fi
# Parse ARGS
POSITIONAL=()
[
{
"nome": "Agrigento",
"sigla": "AG",
"regione": "Sicilia"
},
{
"nome": "Alessandria",
"sigla": "AL",
"regione": "Piemonte"