Skip to content

Instantly share code, notes, and snippets.

getlaravelfn()
{
if [ -z "$1" ]
then
echo 'Error: No project name entered.'
return
else
curl -L -o laravel-master.zip https://github.com/laravel/laravel/archive/master.zip;
unzip laravel-master.zip;
rm laravel-master.zip;
// http://forums.laravel.io/viewtopic.php?id=1943#p12005
Route::get('settings/(account|notifications|profile)', array(
'as' => 'settings',
'uses' => 'account.settings@(:1)'
));
URL::to_route('settings', 'profile');
# ----------------------------------------------------------------------
# ROOT/ folder .htaccess
# ----------------------------------------------------------------------
# Laravel Note:
# Note: Laravel is designed to protect your application code,
# and local storage by placing only files that are necessarily
# public in the public folder. It is recommended that you either
# set the public folder as your site's documentRoot (also known as a web root)
# or to place the contents of public into your site's root directory
# and place all of Laravel's other files outside the web root.
/**
* Simple localStorage with Cookie Fallback
* v.1.0.0
*
* USAGE:
* ----------------------------------------
* Set New / Modify:
* store('my_key', 'some_value');
*
* Retrieve:
@internoma
internoma / UUID.php
Last active August 29, 2015 14:13 — forked from dahnielson/UUID.php
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@internoma
internoma / ocp.php
Last active August 29, 2015 14:14 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
#hero { width:100%;height:100%;background:url('{$img_ps_dir}cms/how-it-works/hero.jpg') no-repeat top center; }
.videoWrapper { position:relative;padding-bottom:56.25%;padding-top:25px;max-width:100%; }
@media (min-width:1000px) {
#hero { background-size:cover; }
}
@media (max-width:767px) {
#hero { width:100%;height:94%!important;background:url('{$img_ps_dir}cms/how-it-works/hero-mobile.jpg') no-repeat top center;background-position: 0 -155px;height: 273px!important;background-position:0 -209px; }
}
@media (max-width:540px) {
function genEmail(){
var nouns = ["man", "world", "hand", "room", "face", "thing", "place", "door", "woman", "house", "money", "father", "government", "country", "mother", "water", "state", "family", "voice", "fact", "moment", "power", "city", "business", "war", "school", "system", "car", "number", "office", "point", "body", "wife", "air", "mind", "girl", "home", "company", "table", "group", "boy", "problem", "bed", "death", "hair", "child", "sense", "job", "light", "question", "idea", "law", "word", "party", "food", "floor", "book", "reason", "story", "son", "heart", "friend", "interest", "right", "town", "history", "land", "program", "game", "control", "matter", "policy", "oil", "window", "nation", "position", "ground", "blood", "action", "wall", "street", "husband", "fire", "mouth", "arm", "sound", "service", "chance", "information", "price", "building", "road", "paper", "court", "attention", "space", "trouble", "form", "society", "art", "market", "force", "effect", "nature", "chair", "period", "order", "t
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"