Skip to content

Instantly share code, notes, and snippets.

View oirodolfo's full-sized avatar
🏳️‍🌈
working from home

Rod Kisten (Costa) oirodolfo

🏳️‍🌈
working from home
View GitHub Profile
#php artisan
alias pa='php artisan'
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
#alias pun="phpunit"
#Available commands:
alias pc='php artisan clear-compiled'
#Remove the compiled class file
@oirodolfo
oirodolfo / oi.sh
Last active January 7, 2016 19:43
<?php
phpinfo();
;(function(window, document, $, Furian, undefined) {
'use strict';
var MeuModulo = window.MeuModulo = (function(Furian) {
var metodoPrivado = function() {
// métodos privados que são acessados diretamente dentro dos públicos
// ex: dentro do init: metodoPrivado()
};
use admin
db.createUser( { user: "homestead", pwd: "secret", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } )
@oirodolfo
oirodolfo / laravel-mongodb-sentinel
Created February 29, 2016 19:45 — forked from Bodom78/laravel-mongodb-sentinel
Use the Sentinel 2.x authentication package with Laravel 5.1 and MongoDB
Work in Progress: More testing to be done.
At a glance Authentication, Activation, Throttle, Groups & Permissions seem to
be working.
Downside: Copy and modify files.
Upside: Not really much work to get it up and running.
Assumes you have Laravel 5.1, jenssegers/laravel-mongodb + session addon set up
and your app is namespaced to App/
app.factory('$localstorage', ['$window', function ($window) {
return {
set: function (key, value) {
$window.localStorage[key] = value;
},
get: function (key, defaultValue) {
return $window.localStorage[key] || defaultValue;
},
setObject: function (key, value) {
$window.localStorage[key] = JSON.stringify(value);
@oirodolfo
oirodolfo / homestead_extras.sh
Created April 12, 2016 19:39 — forked from kuroski/homestead_extras.sh
Script for the installation of MSSQL in Laravel Homestead (read the comments)
#!/bin/bash
#Install Laravel Homestead (http://laravel.com/docs/5.0/homestead)
#ssh into Homestead "homestead ssh"
#Run the script using "sudo bash homestead_extras.sh"
#Leave all the default options sugested during the installation, and do not modify any files!!
apt-get update
#Additional Packages
apt-get install -y php5-ldap php5-mssql
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
function countryForE164Number(phone){try{var phone=cleanPhone(phone),phoneUtil=i18n.phonenumbers.PhoneNumberUtil.getInstance(),number=phoneUtil.parseAndKeepRawInput(phone),output=new goog.string.StringBuffer;return output=phoneUtil.getRegionCodeForNumber(number),output.toString()}catch(e){return""}}function formatNumberForMobileDialing(country,phone){try{var phone=cleanPhone(phone),phoneUtil=i18n.phonenumbers.PhoneNumberUtil.getInstance(),number=phoneUtil.parseAndKeepRawInput(phone,country),output=new goog.string.StringBuffer;return output=phoneUtil.formatNumberForMobileDialing(number,country,!0),output.toString()}catch(e){return""}}function isValidNumber(phone,country){try{var phone=cleanPhone(phone),phoneUtil=i18n.phonenumbers.PhoneNumberUtil.getInstance(),number=phoneUtil.parseAndKeepRawInput(phone,country);return phoneUtil.isValidNumber(number)}catch(e){return!1}}function formatE164(country,phone){try{var phone=cleanPhone(phone),phoneUtil=i18n.phonenumbers.PhoneNumberUtil.getInstance(),number=phoneUtil.pa
http://busypeoples.github.io/post/thinking-in-components-angular-js/
http://www.agilethought.com/blog/articles/how-to-think-angularjs-in-a-jquery-world
http://teropa.info/blog/2014/10/24/how-ive-improved-my-angular-apps-by-banning-ng-controller.html