Skip to content

Instantly share code, notes, and snippets.

View lukespragg's full-sized avatar

Luke Spragg lukespragg

View GitHub Profile
@tebjan
tebjan / mkbundle_cygwin.sh
Last active February 20, 2021 09:20 — forked from shilrobot/package.sh
Updated script as of May 2013 to compile a Mono/.NET C# application into a native executable using mono's mkbundle with cygwin on Windows. Please comment if something does not work or you have an idea for improvement. Now with icon support.
#!/bin/bash
#
#Usage:
#1.) Install cygwin and make sure you select the following packages:
#- gcc-mingw
#- pkg-config
#- mingw-zlib1
#- mingw-zlib-devel
#
#2.) Install the following Mono release package: "Mono for Windows, Gtk#, and XSP"
@wesleyhales
wesleyhales / github-oauth.sh
Created March 30, 2013 00:05
generate oauth token for github access
curl -X POST -u <your_github_username> -H "Content-Type: application/json" -d "{\"scopes\":[\"public_repo\"],\"note\":\"token for pushing from travis\"}" https://api.github.com/authorizations
@cobyism
cobyism / gh-pages-deploy.md
Last active April 12, 2025 09:10
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

import requests
from cStringIO import StringIO
import string
import random
import re
def randstring(size=24, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
headers = {
#!/bin/bash
MCP_VERSION="721"
FORGE_VERSION="latest"
MCP_URL="https://dl.dropbox.com/s/dao8itysfwuhj9q/mcp$MCP_VERSION.zip?dl=1"
FORGE_URL="http://files.minecraftforge.net/minecraftforge-src-$FORGE_VERSION.zip"
mkdir -p forge
cd forge
@letmaik
letmaik / .travis.yml
Last active September 12, 2024 10:41
Deploy snapshots to Sonatype after Travis CI build
language: java
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
after_success:
- python addServer.py
- mvn clean deploy --settings ~/.m2/mySettings.xml
@md-5
md-5 / LanBukkit.java
Created August 19, 2012 01:24
Shows your Bukkit server to the LAN
package com.md_5;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetSocketAddress;
import java.util.logging.Level;
import org.bukkit.plugin.java.JavaPlugin;
public class LanBukkit extends JavaPlugin implements Runnable {
@tjstyle
tjstyle / makedmg.sh
Created May 17, 2012 00:41
DMG Creation Script
#!/bin/bash
# DMG Creation Script
# Usage: makedmg <imagename> <imagetitle> <imagesize (MB)> <contentdir>
#
# imagename: The output file name of the image, ie foo.dmg
# imagetitle: The title of the DMG File as displayed in OS X
# imagesize: The size of the DMG you're creating in MB (Blame Linux for the fixed size limitation!!)
# contentdir: The directory containing the content you want the DMG file to contain
#
@Jaliborc
Jaliborc / Upload to Curse.py
Created January 6, 2012 18:59
This is a simple script that will upload your zipfile to CurseForge. Also works on WoWAce.
import requests
headers = {
'User-Agent': 'CurseForge Uploader Script/1.0',
'X-API-Key': YOUR_KEY
}
files = {'file': ('MyFile.zip', open('MyFile.zip', 'r'))}
data = {
'name': 'Version Banana',
@jpravetz
jpravetz / product_generator.rb
Created December 2, 2011 21:24
Jekyll generator to read json data file and generate product and ingredient pages
#------------------------------------------------------------------------
# encoding: utf-8
# @(#)product_generator.rb 1.00 29-Nov-2011 16:38
#
# Copyright (c) 2011 Jim Pravetz. All Rights Reserved.
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
#
# Description: A generator that creates product, products and
# ingredients pages for jekyll sites. Uses a JSON data
# file as the database file from which to read and