Skip to content

Instantly share code, notes, and snippets.

@mattia72
mattia72 / FullPie.md
Last active August 22, 2019 16:19 — forked from stevenleeg/pie.coffee
This is a simple widget that lets you render pie charts in Dashing.

FullPie widget

This is a simple widget that lets you render pie charts in Dashing. Forked from stevenleeg/pie.coffee It looks a little bit like this:

Screenshot

Usage

dashboard.erb:

@mattia72
mattia72 / AutoHotkey.ahk
Last active May 20, 2020 23:19
AutoHotkey.ahk with handy features.
;=============================================================================
; File: AutoHotkey.ahk
; Author: Mattia72
; Description: Automatically launched AHK script
; Created: 28 okt. 2015
; Project Repo: https://gist.github.com/f422d965d2dcd6db3bbf.git
;=============================================================================
; This script has a special filename and path because it is automatically
; launched when you run the program directly. Also, any text file whose
@mattia72
mattia72 / build_vifm_in_msys2.sh
Created February 28, 2017 12:55
Build vifm in MSYS2
pacman -S gcc
pacman -S make
pacman -S ncurses-devel
pacman -S automake-wrapper
pacman -S autoconf
git clone --branch v0.8.2 https://github.com/vifm/vifm.git
cd vifm
./configure
make
make install
@mattia72
mattia72 / Vim_Build.txt
Last active February 5, 2019 09:30
Build Vim with lua support in MSYS2
https://github.com/Alexpux/MSYS2-packages/issues/16
Download via pacman ncurses-devel ruby python2 python3 and lua source from web
Download and compile lua5.2 (cd src && make mingw && cd .. && make install )
For python3 support : download libint and make it visible by renaming msys-intl-8.dll to libintl.dll and putting it in /usr/lib
Run the following in vim/src:
./configure --prefix=/usr --with-tlib=ncursesw --enable-luainterp --with-lua-prefix=/usr/local --disable-gui --disable-tclinterp --enable-cscope --without-x CPPFLAGS="${CPPFLAGS} -I/usr/include/ncursesw" --enable-python3interp=dynamic --enable-rubyinterp=dynamic --enable-pythoninterp=dynamic --enable-multibyte && make
cd .. && make install
run vim and do :version
@mattia72
mattia72 / AriaTorrentDownload.sh
Last active February 23, 2021 11:56
Command line for torrent download with aria2c
# Command to download file via torrent link using aria2.
# See website and documentation at https://aria2.github.io
# -d specifies the directory to store the downloaded file
# --seed-time=0 disables seeding after download has completed
aria2c -d ~/Downloads --seed-time=0 http://url/to/file.torrent
# or
aria2c -d ~/Downloads --seed-time=0 path/to/file.torrent
# The torrent file itself can be downloaded via
@mattia72
mattia72 / nvim-server.vim
Created April 28, 2020 11:24
server create for neovim
if has('nvim')
if has('win32')
let my_server = '\\.\pipe\nvim-pipe-1234'
else
let my_server = 'nvim.sock'
endif
let i = index(serverlist(), my_server)
if (i < 0)
try
@mattia72
mattia72 / Add-Header.ps1
Last active February 4, 2021 07:07
Adds header for every file in a list with powershell
# Check encoding!
function Add-Header ($file, $firstLine) {
begin {
$content = Get-Content -Encoding Oem -Path $file | Out-String
}
process {
}
end {
"$firstLine`r`n$content" | Set-Content -Encoding Oem -Path $file
}
@mattia72
mattia72 / Sort-ByLength.ps1
Created February 4, 2021 07:19
Sort list of files by length and save it to another list with PowerShell
Get-Content .\file-list.txt |
Get-Item |
Sort-Object Length |
Select-Object length,fullname |
Format-Table -AutoSize |
Out-File .\file-list-sorted-by-length.txt
@mattia72
mattia72 / scoop neovim install.md
Last active February 20, 2021 08:21
Howto install neovim release or pre-release with scoop

Release:

scoop install neovim 

Development (pre-release):

scoop bucket add versions 

scoop install neovim-nightly

@mattia72
mattia72 / Setup Raspi Lite.md
Last active February 21, 2021 08:13
Raspi Lite Setup