Skip to content

Instantly share code, notes, and snippets.

View alanyoshida's full-sized avatar
🐝

Alan Yoshida alanyoshida

🐝
View GitHub Profile
@alanyoshida
alanyoshida / YeomanBowerGrunt.md
Last active October 15, 2015 12:55
Novo Projeto com Yeoman + Bower + Grunt

INSTALA O YEOMAN / GRUNT E BOWER VEM JUNTO

npm install -g yo

GENERATOR HTML5 Boilerplate, jQuery, Modernizr, Bootstrap

npm install -g generator-webapp

CRIA UM NOVO PROJETO

yo webapp

@alanyoshida
alanyoshida / GIT.md
Last active February 8, 2016 18:47
GIT COMMANDS

#Git Bash: Configure Git (git config) ###Syntax: git config --global user.name <“User Name”>

git config --global user.email <UserEmailAddress>

###Set the global User.Name value for the current user on the system: $ git config --global user.name “FirstName LastName”

@alanyoshida
alanyoshida / form html
Created August 1, 2015 16:04
FORM JCROP PARA ENVIAR PARA PHP PRA FAZER O CROP
<form action="http://projetounimed.local/image.php" method="post" onsubmit="return checkCoords();">
<input type="hidden" name="id" value="{{entity.id}}" />
<input type="hidden" name="blob" value="{{ path('getmidiablob', { 'id': entity.id} ) }}" />
<input type="hidden" name="mime" value="{{ entity.mimetype }}" />
<input type="hidden" id="x" name="x" />
<input type="hidden" id="y" name="y" />
<input type="hidden" id="w" name="w" />
<input type="hidden" id="h" name="h" />
<input type="submit" value="Crop Image" />
</form>
@alanyoshida
alanyoshida / image.php
Created August 1, 2015 16:03
USANDO JCROP E PHP PRA FAZER RECORTE EM IMAGEM EM BLOB
<?php
// if( empty($_POST)
// || !isset($_POST['id']) || empty($_POST['id'])
// || !isset($_POST['croppedImage']) || empty($_POST['croppedImage']))
// {
// echo "ERRO: Dados faltando.";
// exit;
// }
@alanyoshida
alanyoshida / gist:d3c5b3b09dc99d74cdc9
Created November 24, 2014 16:01
Wordpress Snippet - Media Upload Selected
<?php
/*
Plugin Name: Media Upload Selected - Snippet
Description: Show by default the Midia uploaded from the selected post on insert midia.
Version: 0.1
License: GPL
*/
add_action( 'admin_footer-post-new.php', 'wpse_76048_script' );
add_action( 'admin_footer-post.php', 'wpse_76048_script' );
@alanyoshida
alanyoshida / gist:fbe083f491e3769c6cdb
Created November 17, 2014 17:25
Wordpress Snippet - Manage Your Media Only
<?php
/*
Plugin Name: Manage Your Media Only
Description: Show only the author's Media in the edit list
Version: 0.1
License: GPL
*/
//Manage Your Media Only
function mymo_parse_query_useronly( $wp_query ) {
@alanyoshida
alanyoshida / gist:84217daa003a83799d64
Created November 17, 2014 17:14
Wordpress Snippet - Show only the author's posts in the edit list
<?php
/*
Plugin Name: Simplify Post Edit List
Description: Show only the author's posts in the edit list
Version: 0.1
License: GPL
Author: Sarah Gooding
Author URI: http://untame.net
*/
@alanyoshida
alanyoshida / gist:74fa53361d971eef64f4
Created October 16, 2014 12:54
Expressão Regular
The following should be escaped if you are trying to match that character
\ ^ . $ | ( ) [ ]
* + ? { } ,
Special Character Definitions
\ Quote the next metacharacter
^ Match the beginning of the line
. Match any character (except newline)
$ Match the end of the line (or before newline at the end)

Dev List Bookmarks

Attention: the list was moved to https://github.com/vitorbritto/dev-list

This page is not maintained anymore, please update your bookmarks.


Recently, I decided to organize my bookmarks. So, like a good fellow, I am sharing with you. I hope you enjoy!

@alanyoshida
alanyoshida / Deploy com Git
Last active March 25, 2019 18:59
Fazendo Deploy de um projeto direto para o servidor via ssh usando o git.
# Primeiro crie um repositorio Local.
$ git init
Initialized empty Git repository in C:\Projetos\site\.git
$ cat ' ' > index.html
$ git add index.html
$ git commit -q -m "Iniciando o repositório"
# No Servidor
# Crie Repositorio Vazio
$ mkdir site.git && cd site.git