This file contains hidden or 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 () { | |
| 'use strict'; | |
| angular | |
| .module('yourApp') | |
| .factory('SweetAlert', SweetAlert); | |
| /* @ngInject */ | |
| function SweetAlert($http, $interpolate, $rootScope) { |
This file contains hidden or 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
| module.exports = function(grunt) { | |
| 'use strict'; | |
| grunt.initConfig({ | |
| ngAnnotate: { | |
| options: { | |
| singleQuotes: true | |
| }, | |
| production: { | |
| files: [ |
This file contains hidden or 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
| # Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
| # Change http://example.com (at the end of the last RewriteRule) to your website url | |
| <IfModule mod_headers.c> | |
| #RequestHeader set X-Prerender-Token "YOUR_TOKEN" | |
| </IfModule> | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |
This file contains hidden or 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
| /** | |
| * Open your playlist and put the code on console (tested with Google Chrome), | |
| * your songs will be printed on your Console too. | |
| * | |
| * @author João Paulo Cercal <[email protected]> | |
| */ | |
| var data = []; | |
| $('.mediaRow').each(function(index, elem) { |
This file contains hidden or 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
| // Jeremie Miserez <[email protected]>, 2015 | |
| // | |
| // A little bit of Javascript to let you export your Google Music library, playlists, and album track lists :) | |
| // | |
| // I posted this as an answer here: http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music | |
| // | |
| // 1. Go to: https://play.google.com/music/listen#/all (or your playlist) | |
| // | |
| // 2. Open a developer console (F12 for Chrome). Paste | |
| // code below into the console. |
This file contains hidden or 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 yourModuleName = angular.module("modules.yourModuleName"); | |
| yourModuleName.directive('ngModel', function() { | |
| return { | |
| restrict: 'A', | |
| priority: -1, | |
| link: function(scope, element, attr) { |
This file contains hidden or 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 | |
| // Nota: O ideal é que esse script fique em outro arquivo para | |
| // não misturar regras de negócio com o HTML ... | |
| $wsdl = "http://ws.registrocivil.org.br/listarCartoriosReceitaFederal.cfc?wsdl"; | |
| try { | |
| $options = array( | |
| 'soap_version' => SOAP_1_1, |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| BASE_PROJECT_DIR=`pwd` | |
| rm $BASE_PROJECT_DIR/.git/hooks/pre-commit 2> /dev/null | |
| ln -s $BASE_PROJECT_DIR/bin/git/hooks/pre-commit $BASE_PROJECT_DIR/.git/hooks/pre-commit | |
| chmod +x $BASE_PROJECT_DIR/.git/hooks/pre-commit |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| DATE_FORMAT="+%Y-%m-%d %H:%M:%S" | |
| echo "["$(date "$DATE_FORMAT")"] Running PHPCSFixer ..." | |
| COMMAND_GIT_DIFF="git diff --cached --name-status --diff-filter=ACM" | |
| COMMAND_PHP_CS_FIXER="./vendor/fabpot/php-cs-fixer/php-cs-fixer fix --dry-run --level=psr2 --verbose" | |
| PHP_FILES_TO_BE_COMMITED=`$COMMAND_GIT_DIFF | grep -E -o '\W+.*?\.php'` |
This file contains hidden or 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
| # git show 0a6cba589532c1b8079e10d9f16511a0d3cd8961:src/filename.ext | |
| git show <treeish>:<file> | |
| # or | |
| git show HEAD~1:src/filename.ext |