Skip to content

Instantly share code, notes, and snippets.

View egel's full-sized avatar

Maciej Sypien egel

View GitHub Profile
@egel
egel / auto-remove-sublime-license-popup
Last active August 14, 2024 12:54
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@egel
egel / audio_extensions
Created April 15, 2015 20:07
Big group of extensions (audio, text)
.caf Core Audio File 4.5 stars
.abm Music Album 4.5 stars
.oga Ogg Vorbis Audio File
.omf Open Media Framework File
.pla Sansa Playlist File
.asd Ableton Live Sample Analysis File
.bnk Adlib Instrument Bank
.bun Cakewalk Bundle File
.csh Cubase Waveform File
.hsb HALion Sound Bank File
@egel
egel / sublime-project-python
Created July 4, 2014 09:19
Settings for Python ".sublime-project" file for Sublime text editor
{
"folders":
[
{
"follow_symlinks": true,
"path": ".",
"folder_exclude_patterns":
[
"bin",
"include",
@egel
egel / cleanup_docker.sh
Created July 22, 2015 13:31
Cleaner for docker containers
#!/bin/bash
set -o errexit
echo "Removing exited docker containers..."
docker ps -a -f status=exited | grep ^data | awk '{print $1}' | xargs -r docker rm -v
#docker ps -a -f status=exited -q | xargs -r docker rm -v
echo "Removing dangling images..."
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi
@egel
egel / color_man_pages.sh
Created October 10, 2015 09:25
Bash color man pages
# To work, link this file to your .bashrc file
# Add colors to man pages
export LESS_TERMCAP_mb=$'\E[01;31m' # enter blinking mode
export LESS_TERMCAP_md=$'\E[01;31m' # enter double-bright mode
export LESS_TERMCAP_me=$'\E[0m' # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_se=$'\E[0m' # leave standout mode
export LESS_TERMCAP_so=$'\E[01;44;33m' # enter standout mode – yellow
export LESS_TERMCAP_ue=$'\E[0m' # leave underline mode
export LESS_TERMCAP_us=$'\E[01;32m' # enter underline mode
@egel
egel / get-gravatar-image.sh
Last active February 12, 2021 22:46 — forked from kristopherjohnson/gravatar.sh
Download Gravatar image for an email address
SIZE=500
EMAIL="maciejsypien@gmail.com"
curl "http://www.gravatar.com/avatar/$(echo -n ${EMAIL} | md5sum | awk '{print $1}')?s=${SIZE}" > gravatar.png
#!/bin/bash
_command=$1
AUTHOR="Maciej Sypień <maciejsypien@gmail.com>"
if [ -z "$_command" ]; then
printf "clear|install|uninstall\n"
exit 1
fi

Keybase proof

I hereby claim:

  • I am egel on github.
  • I am egel (https://keybase.io/egel) on keybase.
  • I have a public key ASB3Kr8PUznjDEU8aZvR9gsFDFtaxahivFn5vgs8ttHgTQo

To claim this, I am signing this object:

@egel
egel / git-prompt.sh
Created October 10, 2015 09:11
Bash git prompt (show current git branch in prompt)
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
#!/bin/bash
matchbox-keyboard