Skip to content

Instantly share code, notes, and snippets.

View clone1018's full-sized avatar

Luke Strickland clone1018

View GitHub Profile
from __future__ import unicode_literals
from sqlalchemy import Table
from gittip.orm import metadata
participants = Table('participants', metadata, autoload=True)
var simplate;
if (err) return fail(res, 404);
if (stats.isDirectory()) {
var tmp_simp;
new_path = fs_path + path.sep + config.index;
fs.exists(new_path, function(exists) {
if(exists === true) {
exports.render = function(simplate, context) {
logger.debug('Request: ' + simplate);
var content_type = mime.lookup(simplate);
res = context.res;
fs.readFile(simplate, function (err, raw) {
if (err) return fail(res, 404, err);
//Check encoding of the file
if (utils.check_encoding(raw) == 'utf8') {
curl -X POST -d @/tmp/derp.png --header "Content-Type:text/plain" http://someurl/
<?php
$input = 'derp';
echo call_user_func($input);
function derp() {
return "Derp!";
}
package sharose.mods.IDR2.coremod; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import net.minecraft.client.Minecraft; import org.objectweb.asm.*; import org.objectweb.asm.tree.*; import sharose.mods.IDR2.IDR2; import sharose.mods.IDR2.utils.BlockWrapper; import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper; import cpw.mods.fml.relauncher.IClassTransformer; public class IDR2Patcher implements IClassTransformer, Opcodes { @Override public byte[] transform(String name, String transformedName, byte[] bytes) { if (transformedName == "net.minecraft.block.Block") { return transform( name, "(IL" + FMLDeobfuscatingRemapper.INSTANCE .unmap("net/minecraft/block/material/Material") + ";)V", "BlockWrapper", bytes); } if (transformedName == "net.minecraft.item.Item") { return transform(name, "(I)V", "ItemWrapper", bytes); } return bytes; } public byte[] transform(String name, String constructorDesc, String wrapperType, byte[] bytes) { Clas
#! /bin/bash
# originaly from http://tinyurl.com/twitch-linux from taladan
# www.youtube.com/user/taladan
# gist created by brodul
INRES="2560x1440" # input resolution
#OUTRES="1024x640" # Output resolution
OUTRES="2560x1440" # Output resolution
#!/bin/sh
# Thanks Gittip https://github.com/gittip/www.gittip.com
# Fail on error.
# ==============
set -e
<?php
use Illuminate\Database\Migrations\Migration;
class ImproveCfs extends Migration
{
/**
* Run the migrations.
*
<?php
Schema::create('cfs_folders', function($table) {
$table->increments('id');
$table->string('name');
$table->integer('parent_id')->unsigned()->nullable();
$table->integer('user_id')->unsigned();
$table->timestamps();