Skip to content

Instantly share code, notes, and snippets.

View asterix24's full-sized avatar

Daniele Basile asterix24

  • Develer srl
  • Firenze
View GitHub Profile
@asterix24
asterix24 / battery.sh
Last active March 27, 2021 15:09
Simple script to show battery info from UPS HAT for rapsberry pi, and shutdonw graceful the rasberry when battery is low level.
#!/bin/bash
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@asterix24
asterix24 / profiles.json
Last active August 8, 2019 09:14
Window Terminal gruvbox Color scheme for new window terminal.
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@asterix24
asterix24 / plot.py
Last active April 20, 2019 22:05
Simple utility to plot raw data, gaussian and fft.
#!/usr/bin/env python3
from optparse import OptionParser
import pylab
import sys
import numpy
import scipy.stats as stats
from scipy.fftpack import fft, fftfreq
parser = OptionParser()
parser.add_option("--ylimit-up", dest="y_up",
@asterix24
asterix24 / tm1640.lua
Created March 24, 2019 21:53
Lua nodeMCU TM1640 Matrix LED 8x8 for wemos D1
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
@asterix24
asterix24 / vimrc
Created September 21, 2015 19:41
My Vim Settings
" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.