Skip to content

Instantly share code, notes, and snippets.

View martinrusev's full-sized avatar
🌱
01010110

Martin Rusev martinrusev

🌱
01010110
  • Berlin, Germany
View GitHub Profile
@martinrusev
martinrusev / imap-search
Last active March 22, 2024 06:50
IMAP Search criteria
@martinrusev
martinrusev / cron_supervisord.ini
Last active July 12, 2023 19:17
Cron supervisord
[supervisord]
nodaemon=true
loglevel=debug
[program:amon]
command=gunicorn -c gunicorn.conf.py wsgi
directory=/amon
autostart=true
autorestart=true
redirect_stderr=true
@martinrusev
martinrusev / abbreviated-unbound.conf
Created December 29, 2017 11:41 — forked from bryanjswift/abbreviated-unbound.conf
Unbound (http://unbound.net/) configuration for local network device testing.
# The server clause sets the main parameters.
server:
# Allow network connections outside of localhost
interface: 0.0.0.0
# Don't automatically run in the background because I want to be able to kill it without hunting a pid
do-daemonize: no
# TODO: Change this to your network range, like `192.168.0.0/16 allow`
access-control: 10.0.0.0/16 allow
# TODO: Change this to your username, or whatever user you want to run/own the `unbound` process
username: "bryanjswift"
@martinrusev
martinrusev / piping.go
Created October 1, 2015 08:09 — forked from kylelemons/piping.go
piping exec.Cmd in golang (example sorts all regular files under a directory by their extension)
package main
import (
"bytes"
"exec"
"log"
"os"
)
// Pipeline strings together the given exec.Cmd commands in a similar fashion
@martinrusev
martinrusev / gist:1169184
Last active May 3, 2020 12:04
Build and upload a python app to Pypi
pip install twine setuptools
python setup.py sdist build
twine upload dist/*
@martinrusev
martinrusev / shutdown.py
Last active September 29, 2019 06:29 — forked from smiller171/shutdown.py
Nightly EC2 shutdown
import boto3
import logging
#setup simple logging for INFO
logger = logging.getLogger()
logger.setLevel(logging.INFO)
#define the connection
ec2 = boto3.resource('ec2')

Keybase proof

I hereby claim:

  • I am martinrusev on github.
  • I am martinrusev (https://keybase.io/martinrusev) on keybase.
  • I have a public key whose fingerprint is 5AFB 23AF F7DF 7EEB 6122 CB69 E6DE 2A5E B208 05C1

To claim this, I am signing this object:

@martinrusev
martinrusev / kill_port
Created October 16, 2013 14:19
Kill process on port
sudo kill -9 `sudo fuser -n tcp 8000 2> /dev/null`
@martinrusev
martinrusev / rails.sh
Last active November 15, 2018 10:50
Installing apps on ARM
# Source
# http://www.iconoclastlabs.com/blog/ruby-on-rails-on-the-raspberry-pi-b-with-rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev
@martinrusev
martinrusev / commands.sh
Last active August 23, 2018 12:51
network_fixes_ubuntu.sh
sudo dpkg-reconfigure network-manager
sudo dhclient ens33
ip address show