This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import unicode_literals | |
from sqlalchemy import Table | |
from gittip.orm import metadata | |
participants = Table('participants', metadata, autoload=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST -d @/tmp/derp.png --header "Content-Type:text/plain" http://someurl/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = 'derp'; | |
echo call_user_func($input); | |
function derp() { | |
return "Derp!"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Thanks Gittip https://github.com/gittip/www.gittip.com | |
# Fail on error. | |
# ============== | |
set -e | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
class ImproveCfs extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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(); |