Skip to content

Instantly share code, notes, and snippets.

View Antrikshy's full-sized avatar

Antriksh Yadav Antrikshy

View GitHub Profile
@Antrikshy
Antrikshy / MCScreensToDesk.sh
Created July 5, 2014 10:49
Tiny script to be added to PATH that copies over Minecraft's screenshots folder to Desktop (on Linux/Mac)
#!/bin/bash
cp -rf ~/Library/Application\ Support/minecraft/screenshots ~/Desktop/
@Antrikshy
Antrikshy / switch_to_server.sh
Created June 28, 2014 02:21
Makes it easy to switch Bukkit/SpigotMC Minecraft server worlds. We have two worlds on our Raspberry Pi and switching requires backing up one world and moving the other out of backup. This automates the process and also runs the server afterwards (can also run current world using "run" argument).
#!/bin/bash
if [ $# -ne 2 ]
then
if [ "$1" != "run" ]
then
echo "Usage: $0 <world to backup> <world to unpack>"
echo "For best results, run with sudo."
exit
else
java -Xms256M -Xmx496M -jar -XX:MaxPermSize=128M /home/pi/SpigotMC/spigot.jar nogui
@Antrikshy
Antrikshy / Letter_Permutations.py
Last active August 29, 2015 14:00
Python script to count the number of ways letters in a string (passed in as argument) can be rearranged
# USAGE: python Letter_Permutations.py <string here>
# Do not put spaces between multiple words in the string
import argparse
import math
# Reads word from argument
parser = argparse.ArgumentParser()
parser.add_argument('word', help = "Word to count combinations for")
args = parser.parse_args()