Skip to content

Instantly share code, notes, and snippets.

View s4s0l's full-sized avatar

Marcin Wielgus s4s0l

View GitHub Profile
@s4s0l
s4s0l / itsnot.sh
Last active January 22, 2018 18:12
'N' things to do aafter elementaary os loki install
sudo apt-get update && sudo apt-get upgrade
sudo apt install gdebi
sudo apt install software-properties-gtk software-properties-common
sudo apt install firefox audacity chromium-browser mc git subversion vlc vim ansible vagrant virtualbox
curl -s "https://get.sdkman.io" | bash
sdk i java 8u152-zulu
@s4s0l
s4s0l / sasol-icla.md
Last active November 11, 2017 00:38
s4s0l ICLA

Marcin Wielgus Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Marcin Wielgus or its affiliates (“SASOL”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SASOL in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact public.sasol@outlook.com.

@s4s0l
s4s0l / Speech.py
Created October 11, 2017 20:22 — forked from ederwander/Speech.py
Real time VAD implementation using Google Speech Api
#Eng Eder de Souza 01/12/2011
#Speech Recognizer prototype ...
#Real time VAD implementation using Google Speech Api
from tempfile import mkstemp
from subprocess import call
from os import remove, listdir
from matplotlib.mlab import find
import pyaudio
import numpy as np
@s4s0l
s4s0l / list_ssh_keys.sh
Created April 27, 2017 07:12
List all ssh keys for all users
#!/bin/bash
for X in $(cut -f6 -d ':' /etc/passwd |sort |uniq); do
if [ -s "${X}/.ssh/authorized_keys" ]; then
echo "### ${X}: "
cat "${X}/.ssh/authorized_keys"
echo ""
fi
done
@s4s0l
s4s0l / trapSignalBash.sh
Last active February 2, 2017 03:14
Trapping signals in bash 4 docker, detecting -ti interactive option present or not
#!/bin/bash
set -e
DAEMONPID=0
trap 'echo SIGTERM; kill ${!}; kill $DAEMONPID; exit 143' SIGTERM
trap 'echo SIGKILL; kill ${!}; kill $DAEMONPID; exit 137' SIGKILL
trap 'echo SIGINT; kill ${!}; kill $DAEMONPID; exit 130' INT
dockerd --host=unix:///var/run/docker.sock --storage-driver=vfs &
DAEMONPID="$!"
while true; do
docker version && break
@s4s0l
s4s0l / install_all_docker_tools.sh
Last active November 22, 2017 01:49
Script to inmstall docker with all tools
#!/usr/bin/env bash
#Installs docker-* tools on Mint 17.3 - run with sudo
set -e
DISTRO_NAME=$(lsb_release -a 2>/dev/null | grep Codename: | cut -f2)
DOCKER_VERSION=17.09.0~ce-0~ubuntu
COMPOSE_VERSION=1.17.1
MACHINE_VERSION=v0.13.0
DISTRO_NAME=${DISTRO_NAME/rosa/trusty}
DISTRO_NAME=${DISTRO_NAME/sonya/xenial}
@s4s0l
s4s0l / find_who_messes_my_bash
Created December 29, 2016 14:31
Find out what is happening during bash startup, where variables are set, what is being cvalled
PS4='${BASH_SOURCE}:${LINENO} ' bash -lxe