Skip to content

Instantly share code, notes, and snippets.

Minhaz Mahmud minhaz1

Block or report user

Report or block minhaz1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@beachandbytes
beachandbytes / rtorrent.rc
Created Mar 28, 2015
rTorrent config. Currently moves completed downloads to folders based on label (But only if label is applied before download finishes)
View rtorrent.rc
# rtorrent config file ß
directory = /home/hd4/accountname/torrents/data
session = /home/hd4/accountname/.config/rtorrent/sessP5,5,load_start="~/torrents/watch/*.torrent"
port_range = 57657-57657
encryption = allow_incoming,enable_retry,try_outgoing
dht = off
peer_exchange = no
check_hash = no
execute = {sh,-c,rm -f /home/hd4/accountname/.config/rtorrent/session/rpc.socket}
scgi_local = /home/hd4/accountname/.config/rtorrent/session/rpc.socket
View osx-for-hackers.sh
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@kwlzn
kwlzn / uwsgi-pex.md
Last active Jun 13, 2018
uWSGI + pex
View uwsgi-pex.md

Building a test pex

setup.py

yakuza:src kw$ cat testapp/setup.py
#!/usr/bin/env python

from distutils.core import setup
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active Dec 1, 2019
Opening and closing an SSH tunnel in a shell script the smart way
View opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost
You can’t perform that action at this time.