Skip to content

Instantly share code, notes, and snippets.

View goldbattle's full-sized avatar

Patrick Geneva goldbattle

View GitHub Profile
@goldbattle
goldbattle / patches.php
Last active December 21, 2015 05:48
JSTR Mod Table Display
<?php
// Data/Constants/Finals
$COL_MASTER = "580";
$COL_MODS = "406";
$COL_VERSION = "130";
$COL_DOWNLOAD = "100";
// Json url location
$branch_location="http://files.jslegacy.com/texture-patcher/data/branch.json";
:: Name: Batch Converter
:: Author: GoldBattle
:: Copyright: Copyright (c) 2009-2015, Soartex Graphics <http://soartex.net/>
:: License: All Rights Reserve
:: Support: support@soartex.net
@echo OFF
:: Ask for filename choices
echo.
BRANCH=master
REMOTE_REPOSITORY=https://github.com/Soartex-Modded/Modded-1.6.x.git
TMP_DIR=./tmp/modded-1.6.x/
TARGET_DIR=./modded-1.6.x/
VERSION_FILE=./$TARGET_DIR/version.txt
# Clone data from github
git clone --depth=1 --branch $BRANCH $REMOTE_REPOSITORY $TMP_DIR
# Fetch information
@goldbattle
goldbattle / gist:8637575
Created January 26, 2014 19:02
oc.tc Json
{
"us.oc.tc": {
"players_online": 2281,
"players_total": 3000,
"status": "Online",
"mc_versions": [
"1.7.2",
"1.6.4",
"1.6.2"
],
import java.util.ArrayList;
import java.util.Scanner;
/**Feb 20, 2014*/
//Period 4
public class LillyPads {
public static void main(String args[]){
Scanner kb = new Scanner(System.in);
System.out.println("Data-points input:");
@goldbattle
goldbattle / java_conventions.md
Last active January 20, 2023 07:19
Java Coding Conventions

Coding Conventions

This file will cover important coding practices that are important to stress when coding this program. Listed below are some of the more important details that should be stressed. Each programmer has his/her own way to deliver code. The importance of having similar coding conventions throughout this program are listed below.

  • 80% of the time spent on a piece of software goes to maintenance.
  • Hardly any software is maintained for its whole life by the original author.
  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
  • If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
#!/usr/bin/env python
from gimpfu import *
import os
import os.path
import glob
import sys
# This adds the suffix to the end of the file
def modify_path(image, insertion):
{
"page_1": {
"image_background": "background.jpg",
"image_forground": "person.jpg",
"text": "Text for the page in here",
"choices": [
{
"text": "Choice #1",
"id_link": "page_2"
},
@goldbattle
goldbattle / hi8-fetch.py
Created January 27, 2016 01:54 — forked from celoyd/hi8-fetch.py
Fetch and untile tiled Himawari-8 images from the http://himawari8.nict.go.jp PNG endpoint
import requests as req
import sys
from dateutil.parser import parse
from PIL import Image
from io import BytesIO
# hi8-fetch.py <date> <zoom level> <output>
# E.g.: hi8-fetch.py 2016-01-13T22:10:00 8 2016-01-13T221000-z8.png
# Fetch Himawari-8 full disks at a given zoom level.
# Valid zoom levels seem to be powers of 2, 1..16, and 20.