Skip to content

Instantly share code, notes, and snippets.

View T31337's full-sized avatar

Trenton T31337

  • 1337 Software
  • In The Interwebz, For All To See And Access Equally
View GitHub Profile
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active May 7, 2025 21:41
Opening and closing an SSH tunnel in a shell script the smart way

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

@dmitshur
dmitshur / gist:6927554
Last active December 29, 2024 12:06
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.

For the Mac [some possible needed tools? try without]

brew update
brew install wget
brew install curl

Setup some directory structure

mkdir minecraft
@mid-kid
mid-kid / minecraft-chat-client.py
Last active November 27, 2024 08:33
Basic minecraft chat client written in Python.
#!/usr/bin/env python3
"""
Simple script that implements the minecraft protocol
to create a basic chat client for said game.
No encryption, no online mode, no parsing of chat messages.
I tried to make it as extendable as possible, so hack away.
PEP8 Note: Ignored E302 (2 newlines between functions)
"""
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@th3mccoder
th3mccoder / gist:5a21ba3f34b58db45379
Created November 1, 2014 01:00
Minecraft 1.7.10 Hacked Client Coding - Fly Hack (Non crappy)
Copied from my old source.
//put this before everything
float speed = 1.25F;
//if the hack is enabled
mc.thePlayer.capabilities.isFlying = false;
mc.thePlayer.isInWeb = false; //have to change web to static, easy to do.
@th3mccoder
th3mccoder / gist:5fb7ec815f5027f415be
Last active December 4, 2017 01:09
Minecraft 1.7.10 Hacked Client Coding - Jesus Hack
Simple Jesus Tutorial.
Goto BlockLiquid.java
Search for: public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
The return statement should be null
Replace it with an if statement and if it's not true, set it to null.
@sirtaj
sirtaj / minecraft-backup.sh
Created January 21, 2015 16:01
minecraft backup script
#!/bin/bash
# Backup script for minecraft server. Uses duplicity(1).
. /etc/minecraft/config
. /etc/minecraft/backup.cfg
BACKUP_URL="file://${BACKUP_TARGET}"
CONSOLE="${RUN}/console.in"
@jrosco
jrosco / popup gtk.window
Last active December 4, 2017 00:20
Gtk icon popup gtk.window
#!/usr/bin/python
import gtk
class StatusIcon:
def __init__(self):
self.statusicon = gtk.StatusIcon()
@stevenswafford
stevenswafford / google-dorks
Created June 6, 2015 05:57
Listing of a number of useful Google dorks.
" _ _ "
" _ /|| . . ||\ _ "
" ( } \||D ' ' ' C||/ { % "
" | /\__,=_[_] ' . . ' [_]_=,__/\ |"
" |_\_ |----| |----| _/_|"
" | |/ | | | | \| |"
" | /_ | | | | _\ |"
It is all fun and games until someone gets hacked!