This has been moved to the BlobBuilder.js project on GitHub.
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
/** | |
* @Company: winrtech | |
* @Author: rahul | |
*/ | |
'use strict'; | |
// Directive : icheck | |
// attributes | |
// data-label : To set element label or text |
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() { | |
var filter = function(input) { | |
var output; | |
return output; | |
} | |
angular.module('App', []) | |
.filter('filter-name', filter); |
#Laravel 5 Simple ACL manager
Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.
If the user has a 'Root' role, then they can perform any actions.
Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php
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 | |
// Origianlly : http://php.net/manual/en/function.scandir.php#110570 | |
function printAllFile($dir) { | |
$result = array(); | |
$cdir = scandir($dir); | |
foreach ($cdir as $key => $value) | |
{ | |
if (!in_array($value,array(".",".."))) |
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
// Be careful when changing Object's prototype to avoid overwriting of methods | |
if (Object.prototype.setPath === undefined && Object.prototype.getPath === undefined) { | |
Object.prototype.setPath = function (path, value, notation) { | |
function isObject(obj) { return (Object.prototype.toString.call(obj) === '[object Object]' && !!obj);} | |
notation = notation || '.'; | |
path.split(notation).reduce(function (prev, cur, idx, arr) { | |
var isLast = (idx === arr.length - 1); | |
// if <cur> is last part of path | |
if (isLast) return (prev[cur] = value); |
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
[ { stateCode: 'AL', state: 'Alabama', city: 'Autauga' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Baldwin' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Barbour' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Bibb' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Blount' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Bullock' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Butler' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Calhoun' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Chambers' }, | |
{ stateCode: 'AL', state: 'Alabama', city: 'Cherokee' }, |
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
[ { code: 'AL', state: 'Alabama' }, | |
{ code: 'AK', state: 'Alaska' }, | |
{ code: 'AZ', state: 'Arizona' }, | |
{ code: 'AR', state: 'Arkansas' }, | |
{ code: 'CA', state: 'California' }, | |
{ code: 'CO', state: 'Colorado' }, | |
{ code: 'CT', state: 'Connecticut' }, | |
{ code: 'DE', state: 'Delaware' }, | |
{ code: 'FL', state: 'Florida' }, | |
{ code: 'GA', state: 'Georgia' }, |
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
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
# generate server.xml with the following command: | |
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes | |
# run as follows: | |
# python simple-https-server.py | |
# then in your browser, visit: | |
# https://localhost:4443 | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl |
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
# Ubuntu 16.04 | |
sudo apt-get install libcurl4-openssl-dev pkg-config libssl-dev libsslcommon2-dev | |
# Install php dev | |
sudo apt-get install php-dev | |
# for php5.6, sudo apt-get install php5.6-dev | |
# Install pecl | |
sudo apt-get install php-pear |
OlderNewer