A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
A list of amazingly awesome PHP libraries, resources and shiny things.
| { | |
| "node": true, | |
| "browser": true, | |
| "esnext": true, | |
| "bitwise": true, | |
| "camelcase": true, | |
| "curly": true, | |
| "eqeqeq": true, | |
| "immed": true, | |
| "indent": 4, |
| var mdSvgIcon = angular.module('mdSvgIcon', []); | |
| mdSvgIcon.directive('mdSvgIcon', function() { | |
| return { | |
| name: 'md-svg-icon', | |
| template: '<svg class="icon" role="img" title="{{title}}"><use xlink:href="{{iconSprite}}"/></svg>', | |
| restrict: 'E', | |
| scope: {}, | |
| link: function preLink($scope, $element, $attrs) { | |
| $scope.title = $attrs.title || $attrs.iconSprite; |
| /** | |
| * Loads the reference of SVG element from icon set sprite using inline svg reference | |
| */ | |
| function Icon(el, config) { | |
| if (el.tagName != 'svg') { | |
| el = angular.element('<svg><use xlink:href="' + config.url + '#' + el.id + '"/></svg>')[0]; | |
| } | |
| // Inject the namespace if not available... | |
| if (!el.getAttribute('xmlns')) { |
| // Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
| // jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
| // author: Pawel Kozlowski | |
| var myApp = angular.module('myApp', []); | |
| //service style, probably the simplest one | |
| myApp.service('helloWorldFromService', function() { | |
| this.sayHello = function() { | |
| return "Hello, World!" |
| (function() { | |
| var app = angular.module('myApp', []); | |
| app.config(['$provide', function($provide) { | |
| // decorates the $log instance to disable logging | |
| $provide.decorator('$log', ['$delegate', | |
| function($delegate) { | |
| var $log, enabled = true; | |
| $log = { |
| ## GIT ALIASES ## | |
| alias gitb='git branch -a -v' | |
| alias gits='git status' | |
| alias gitd='git diff' | |
| alias gita='git add' | |
| alias gitph='git push' | |
| alias gitl='git log' | |
| alias gitr='git remote' | |
| function gitp { |
| sudo apt-get update | |
| sudo apt-get install build-essential libssl-dev | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash | |
| nvm install stable | |
| nvm alias default stable | |
| nvm use default |
| var fs = require('fs'); | |
| var path = require('path'); | |
| var atomPackagesPath = path.join(process.env.HOME, '.atom/packages'); | |
| fs.readdirSync(atomPackagesPath).forEach(function(current) { | |
| var packagePath = path.join(atomPackagesPath, current); | |
| if (fs.statSync(packagePath).isDirectory()) { | |
| var p = require(packagePath + '/package.json'); |
| # EditorConfig helps developers define and maintain consistent | |
| # coding styles between different editors and IDEs | |
| # editorconfig.org | |
| root = true | |
| [*] | |
| # Change these settings to your own preference | |
| indent_style = space |