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
#!/usr/bin/env bash | |
REPO=`dirname "$(cd ${0%/*} && echo $PWD/${0##*/})"` | |
LUADIST_BOOTSTRAP="$REPO/luadist-bootstrap" | |
INSTALLATION="$REPO/_install" | |
DATA_DIR="data" | |
# Get LuaDist bootstrap | |
git clone "https://github.com/LuaDist-core/bootstrap.git" "$LUADIST_BOOTSTRAP" |
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
-- LuaDist Manifest file | |
-- Generated on 2016-03-23, 13:35 | |
{ | |
packages = { | |
lua_cliargs = { | |
["1.1-1"] = { | |
dependencies = { | |
"lua >= 5.1" | |
} | |
}, |
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
{ | |
packages = { | |
["lunaci"] = { | |
["0.2-1"] = { | |
dependencies = { | |
"lua >= 5.1", | |
"penlight >= 1.3.3.luadist", | |
"lualogging >= 1.3.0", | |
} | |
} |
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
-- manifest test | |
-- testing push access to gist repo |
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
/** | |
* List projects based on criteria. | |
* @param action | |
* @param user | |
*/ | |
public Iterable<IProject> executeAction(ListProjectsAction action, IUser user) { | |
Iterable<IProject> items = projects.values(); | |
if(action.getParams().containsKey("filter")){ | |
Pattern pattern = Pattern.compile(Pattern.quote(action.getParam("pattern")) |
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 | |
$data = file_get_contents($argv[1]); | |
$offset = isset($argv[2]) ? $argv[2] : 0; | |
if(preg_match_all('~data:image\/png;base64,([^"]+)"~i', $data, $matches)){ | |
foreach($matches[1] as $k=>$i){ | |
$id = $k+1+$offset; | |
echo "Processing page $id..."; | |
$image = imagecreatefromstring(base64_decode($i)); |
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 | |
/** | |
* The Game of Life - a PHP simulator of the famous game. | |
* Early development state. | |
* | |
* Copyright 2011 Martin Srank (http://smasty.net) | |
* | |
* This source file is subject to the MIT license: | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
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 | |
namespace Smasty\Extensions; | |
use Nette, | |
Nette\Environment; | |
/** | |
* Smart presenter factory - supports custom name conventions for presenters. |
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
# ========= PS1 SETTINGS | |
# Git branch | |
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/@\1/' | |
} | |
# Pipe code notifiation | |
bash_prompt_command() { |
NewerOlder