Skip to content

Instantly share code, notes, and snippets.

View n1zzo's full-sized avatar

Niccolò Izzo n1zzo

  • Micron Technology, Inc.
  • Milan, Italy
  • X @n1zzo
View GitHub Profile
@n1zzo
n1zzo / Dockerfile
Created April 4, 2019 21:15
Prosody Alpine Build + Run Setup
FROM alpine:3.8
MAINTAINER Niccolò Izzo <izzo.niccolo@gmail.com>
ARG version=0.11.2
# Runtime dependencies
RUN apk --update add --no-cache lua-dev sqlite openssl libidn ca-certificates lua-dbi lua-expat lua-filesystem lua-sec lua-socket lua-lzlib
# Build dependencies
RUN apk --update add --virtual build-dependencies alpine-sdk lua-dev openssl openssl-dev libidn-dev build-base linux-headers luarocks && \
wget https://prosody.im/downloads/source/prosody-$version.tar.gz && \
tar xzf prosody-$version.tar.gz && \
@n1zzo
n1zzo / .tmux.conf
Last active August 2, 2018 08:44
Text Editing Basic Config
set-option -g mouse on
# make scrolling with wheels work
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Emulate scrolling by sending up and down keys if these commands are running in the pane
tmux_commands_with_legacy_scroll="nano less more man git"
bind-key -T root WheelUpPane \
#!/bin/sh
# apkdoublecheck.sh Verify an apk signature with a certificate extracted
# from a trusted apk
# By default the trusted apk must have a valid v1 and v2 signature
# while for the target app it is sufficient to have a valid v1 signature
if [ $# -eq 0 ]
then
echo "Usage: apkdoublecheck.sh <trusted_apk> <untrusted_apk>"
@n1zzo
n1zzo / airdroid.md
Last active May 15, 2019 05:56
Air-droid: a google-free ecosystem
@n1zzo
n1zzo / pulseswitch.sh
Created December 18, 2016 18:16
Switches from local and remote pulseaudio server configurations. statefully.
#! /bin/sh
PULSE_USER=nico
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
function pa_remote {
@n1zzo
n1zzo / recordaudio.sh
Last active March 28, 2016 22:35
Record audio from your browser using pulseaudio
#!/bin/sh
# Record audio from browsers - requires sox, pulseaudio-utils
# Get audio stream index
INDEX=$(pacmd <<< "list-sink-inputs" | grep index | cut -d ':' -f 2)
pactl load-module module-null-sink sink_name=recordsink
pactl move-sink-input $INDEX recordsink
parec -d recordsink.monitor | sox -t raw -b 16 -e signed -c 2 -r 44100 - record.flac