Skip to content

Instantly share code, notes, and snippets.

View nomadjimbob's full-sized avatar
🏠
Working from Home

James Collins nomadjimbob

🏠
Working from Home
View GitHub Profile
@hcooper
hcooper / proxy.py
Created November 9, 2011 19:36
A simple threaded caching HTTP proxy
#!/usr/bin/python
"""
A simple threaded caching HTTP proxy.
Hereward Cooper <[email protected]>
v0.1
"""
LISTENPORT = 8000
LISTENINT = '127.0.0.1'
@robertvrabel
robertvrabel / list.html
Last active February 27, 2022 15:46
Updating a database display order with drag and drop in SQL
<table>
<thead>
<tr>
<th scope="col">user_id</th>
<th scope="col">display_order</th>
<th scope="col">todo</th>
</tr>
</thead>
<tbody>
<tr>
@DevSrSouza
DevSrSouza / JsonItemStack.java
Created December 3, 2017 01:48
Parse Bukkit ItemStack to JSON
import com.google.gson.*;
import org.bukkit.Color;
import org.bukkit.DyeColor;
import org.bukkit.FireworkEffect;
import org.bukkit.Material;
import org.bukkit.block.banner.Pattern;
import org.bukkit.block.banner.PatternType;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemFlag;
import org.bukkit.inventory.ItemStack;
@aslamhadi
aslamhadi / backup.sh
Last active January 17, 2024 11:37
Shell script to dump mysql db and upload it to Back Blaze
#!/bin/bash
DB_NAME=""
DB_PASSWORD=""
DB_USER=""
DB_HOST=""
TODAY_DATE="$(date +'%d_%m_%Y_%H_%M_%S')"
FILENAME="$DB_NAME$TODAY_DATE".gz
BACKUP_DIR="/home/aslam/backup/$FILENAME"