Skip to content

Instantly share code, notes, and snippets.

@Big-Shark
Big-Shark / propel+lara5.md
Last active August 29, 2015 14:13
Как подключать пропел 2, в ларавель5

Все достаточно легко, первое это добавить пропел в проект через композер, все это описано на сайте пропела и не вызывает проблем.

Дальше несколько путей, если есть БД и если нет, я опишу сейчас путь при котором мы будем использовать стандартную авторизацию ларавель 5, а соответственно нам понадобятся его таблицы.

1 Установить пропел, я думаю вы это уже сделали

2 Дальше чтобы не лазить постоянно в папку вендоров к бин файлу, я вынес его в корень проекта, команда

ln -s vendor/bin/propel propel
@Big-Shark
Big-Shark / speedtest.php
Last active August 29, 2015 14:11
speed test magic function
<?php
<<<CONFIG
packages:
- "lavoiesl/php-benchmark: dev-master"
CONFIG;
/**
* run command "melody run https://gist.github.com/Big-Shark/b8231dde88e3639add70"
*
*/
@Big-Shark
Big-Shark / server.php
Last active August 29, 2015 14:10
server.php
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$uri = urldecode($uri);
$requested = __DIR__.'/public'.$uri;
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' and file_exists($requested))
@Big-Shark
Big-Shark / github_statistic.php
Last active August 29, 2015 14:00
github_statistic.php
<?php
$user_name = 'big-shark';
$client_id = '';
$client_secret = '';
function github($url, $query = array())
{
global $client_id, $client_secret, $user_name;
$query['client_id'] = $client_id;
$query['client_secret'] = $client_secret;
@Big-Shark
Big-Shark / .zshrc
Last active August 29, 2015 13:59
.zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="random"
# Example aliases
@Big-Shark
Big-Shark / eval_service_list.md
Created February 11, 2014 03:48
Выполнения кода в браузере
@Big-Shark
Big-Shark / artisan_installer.php
Last active January 3, 2016 18:59
php artisan install
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Process\Process;
class Install extends Command {
/**