Skip to content

Instantly share code, notes, and snippets.

View nunomazer's full-sized avatar
🎯
Coding ... allways

Ademir Mazer Jr [ Nuno ] nunomazer

🎯
Coding ... allways
View GitHub Profile
@nunomazer
nunomazer / CreateUser.php
Created June 11, 2023 15:14 — forked from ajaxray/CreateUser.php
A Laravel Artisan command for creating user with name, email and password
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Validator;
class CreateUser extends Command
{
@nunomazer
nunomazer / gitcom.md
Created June 7, 2021 20:52 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@nunomazer
nunomazer / .bashrc
Last active August 28, 2015 17:59 — forked from patik/.bashrc
Bash configure proxy for corporate network
# configure proxy for git while on corporate network
# From https://gist.github.com/garystafford/8196920
function proxy_on(){
# assumes $USERDOMAIN, $USERNAME, $USERDNSDOMAIN
# are existing Windows system-level environment variables
# assumes $PASSWORD, $PROXY_SERVER, $PROXY_PORT
# are existing Windows current user-level environment variables (your user)
# environment variables are UPPERCASE even in git bash
#!/bin/sh
# Laravel 5 new project setup bash script.
# Inspired by Mitchell van Wijngaarden
# Extended by John in 't Hout
projectname=$1
git clone -o laravel -b develop https://github.com/laravel/laravel.git ${projectname} >/dev/null
cd ${projectname}
git checkout --orphan master
@nunomazer
nunomazer / gist:3219809
Created July 31, 2012 19:31 — forked from FlorianX/gist:1965947
dynamic loaded Zend ACL
<?php
/**
* ACL Plugin
* @package Plugin
* @author FlorianX
*/
class Plugin_Auth_Acl extends Zend_Acl
{
private $_roleRecursionStop = array();
private $_resourceRecursionStop = array();
@nunomazer
nunomazer / application.coffee
Created May 14, 2012 15:39 — forked from caleywoods/application.coffee
Backbone JS / Fullcalendar
$ ->
Event = Backbone.Model.extend()
Events = Backbone.Collection.extend({
Model: Event,
url : 'events'
})
EventsView = Backbone.View.extend({
initialize: ->
var SomeModel = Backbone.Model.extend({});
someModel = new SomeModel();
someModel.bind("change", function(model, collection){
alert("You set some_attribute to " + model.get('some_attribute'));
});
someModel.set({some_attribute: "some value"});
namespace.views.MyWizard = Backbone.Views.extend({
initialize: function() {
_.bindAll(this, 'render', 'wizardMethod');
}
render: function() {
this.wizardMethod();
return this;
},