Skip to content

Instantly share code, notes, and snippets.

View msurguy's full-sized avatar

Maksim Surguy msurguy

View GitHub Profile
@msurguy
msurguy / index.html
Created June 18, 2013 04:13
A CodePen by Maksim Surguy.
<p>Double click on the boxes to edit. Drag to re-position <button id="save">Save as image</button></p>
<div id="container"></div>
@msurguy
msurguy / Boxfile
Created June 14, 2013 17:15
Pagodabox file for Laravel 4
web1:
document_root: public
php_version: 5.3.8
php_extensions:
- apc
- mbstring
- mcrypt
- pdo_mysql
- zip
- eaccelerator
@msurguy
msurguy / User.php
Created June 14, 2013 00:18
Password setter for laravel 4 user model
public function setPasswordAttribute($value)
{
$this->attributes['password'] = Hash::make($value);
}
@msurguy
msurguy / eloquent.md
Last active February 8, 2022 03:13
Laravel 4 Eloquent Cheat Sheet.

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@msurguy
msurguy / packages.md
Created May 24, 2013 23:20
Cool and useful Laravel 4 packages
@msurguy
msurguy / frontend.md
Created May 24, 2013 04:52
Cool frontend libraries

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

@msurguy
msurguy / list.md
Last active December 17, 2015 14:19
List of useful Frontend plugins for web development
@msurguy
msurguy / chartsandstats.txt
Created May 16, 2013 02:25
Stats and charts libraries
http://benpickles.github.io/peity/
http://www.humblesoftware.com/finance/index
https://github.com/HumbleSoftware/envisionjs
http://humblesoftware.com/flotr2/
http://dygraphs.com/
http://tenxer.github.io/xcharts/examples/
http://square.github.io/cubism/
http://www.justgage.com/
@msurguy
msurguy / filter.php
Created April 23, 2013 17:15
HTTPS filter for laravel
Route::filter('https', function() {
if (Request::env()=='production'){
if (!Request::secure()) return Redirect::to_secure(URI::current(), 301);
}
});