This file contains 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
/** | |
* Will evaluate all the keys of a given object containing a plus sign "+" | |
* to the expression result. | |
* | |
* example: | |
* var a = 2; | |
* var obj = { " 'hello' + a " : true }; | |
* rewriteProperties(obj); // returns { hello2: true } | |
* | |
*/ |
This file contains 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
{% macro menuLinks(root, maxdepth) %} | |
{% import _self as macros %} | |
{# print a UL tree #} | |
{% for link in root.children %} | |
<li> | |
<a href="{{ link.slug }}">{{ link.name }}</a> | |
{% if link.children and (maxdepth > link.depth or not maxdepth) %} | |
<ul> | |
{{ macros.menuLinks(link, maxdepth) }} | |
</ul> |
This file contains 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
function wwwwrite () { | |
sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX $1 && sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx $1 | |
} |
This file contains 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 | |
function edit () | |
{ | |
$model = new Article(); | |
$form = new DataForm($model); //--> $form->model | |
$form->text('title'); | |
$form->text('author.name'); |
This file contains 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
# ---------------------------------------------------------------------- # | |
# Target DBMS: MySQL 5 # | |
# Project name: Northwind # | |
# Author: Valon Hoti # | |
# Created on: 2010-07-07 20:00 # | |
# ---------------------------------------------------------------------- # | |
DROP DATABASE IF EXISTS northwind; | |
CREATE DATABASE IF NOT EXISTS northwind; |
This file contains 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
var gulp = require('gulp'), | |
plumber = require('gulp-plumber'), | |
rename = require('gulp-rename'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var concat = require('gulp-concat'); | |
var jshint = require('gulp-jshint'); | |
var uglify = require('gulp-uglify'); | |
var imagemin = require('gulp-imagemin'), | |
cache = require('gulp-cache'); | |
var minifycss = require('gulp-minify-css'); |
This file contains 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 | |
use Illuminate\Database\Console\Migrations\BaseCommand; | |
use Illuminate\Console\ConfirmableTrait; | |
use Illuminate\Database\Migrations\Migrator; | |
use Symfony\Component\Console\Input\InputOption; | |
class MigrateDone extends BaseCommand | |
{ |
This file contains 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 Zofe\Rapyd\DataForm\Field; | |
use Illuminate\Support\Facades\Form; | |
class Multiselect extends Field | |
{ | |
public $type = "checks"; | |
public $multiple = true; | |
public $size = null; | |
public $description = ""; |
This file contains 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 | |
class Aggregate implements \IteratorAggregate | |
{ | |
protected $var; | |
public function __construct($var = null) | |
{ | |
if (is_array($var)) { | |
$this->var = new ArrayIterator($var); |
This file contains 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
/* bad indentation is NetBeans' fault, camelCase is Propel's fault */ | |
var retrieveTeachers = function(query, process) { | |
// let them be json | |
var transformTeachers = function(teachers) { | |
return $.map(teachers, function(teacher) { | |
return { | |
id: teacher.Id, | |
FullName: (teacher.Name + ' ' + teacher.Surname), | |
// these functions allows Bootstrap typehead to use this item in places where it was expecting a string | |
toString: function() { |
OlderNewer