Skip to content

Instantly share code, notes, and snippets.

@abdullah353
abdullah353 / flex_boilerplate.html
Created March 7, 2014 10:42
Basic Flex Example
<!DOCTYPE html>
<html lang="en">
<head>
<style>
.flex
{
/* basic styling */
width: 350px;
height: 200px;
@abdullah353
abdullah353 / laravel_globalUserView.php
Created March 6, 2014 05:45
Share Variable with all views: Now I have access to the currently logged in user as $user in all views, and can access anything from it as normal, such as $user->email
class BaseController extends Controller
{
public function __construct()
{
// Fetch the User object, or set it to false if not logged in
if (Sentry::check()) {
$user = User::find(Sentry::getUser()–>id);
}
else {
$user = false;
@abdullah353
abdullah353 / laravel_model
Created March 5, 2014 07:04
Deafult Values In laravel Model
class MyModel extends Eloquent {
protected $attributes = array(
'field' => 'default',
'field2' => 'default2',
);
}
@abdullah353
abdullah353 / 0_reuse_code.js
Created February 7, 2014 12:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console