Skip to content

Instantly share code, notes, and snippets.

View adeonir's full-sized avatar
💻
Working remotely

Adeonir Kohl adeonir

💻
Working remotely
View GitHub Profile
<html>
<head>
<title>CakePHP Gerador de Hash</title>
</head>
<body>
<h1>Gerador de Hash Para CakePHP</h1>
<p>Recarregue a p&aacute;gina para gerar novos hashs!</p>
<?php
function geraSenha($tamanho = 15, $minusculas = true, $maiusculas = true, $numeros = true, $simbolos = true)
{
public function add()
{
$image = $this->Images->newEntity();
if ($this->request->is('post')) {
$image = $this->Images->patchEntity($image, $this->request->data);
$album_id = $image['album_id'];
foreach ($image['image_file'] as $file) {
$image['image'] = $this->Upload->send($file, $album_id);
if ($this->Images->save($image)) {
@adeonir
adeonir / countries.php
Created May 12, 2016 19:21 — forked from JeffreyWay/countries.php
Country Names + Codes
[
"United States" => "us",
"Afghanistan" => "af",
"Albania" => "al",
"Algeria" => "dz",
"American Samoa" => "as",
"Andorra" => "ad",
"Angola" => "ad",
"Anguilla" => "ai",
"Antarctica" => "aq",
@adeonir
adeonir / ContextCmder-Enable.reg
Created May 23, 2016 17:54
Enable Cmder right click on Windows
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
@="Open Cmder Here"
"Icon"="C:\\Users\\adeonir\\.cmder\\Cmder.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder\command]
@="\"C:\\Users\\adeonir\\.cmder\\Cmder.exe\" \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\Cmder]
@adeonir
adeonir / fancy-git-log-in-terminal
Created July 15, 2016 02:25 — forked from apavamontri/fancy-git-log-in-terminal
Fancy git log in terminal
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
@adeonir
adeonir / .htaccess
Created December 23, 2016 14:10
CakePHP .htaccess configuration for HTTPS
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
import { src, dest, watch, series, parallel } from 'gulp';
import plumber from 'gulp-plumber';
import stylus from 'gulp-stylus';
import postcss from 'gulp-postcss';
import autoprefixer from 'autoprefixer';
import lost from 'lost';
import rupture from 'rupture';
import cssnano from 'cssnano';
import pug from 'gulp-pug';
import babel from 'gulp-babel';
const gulp = require('gulp');
const yargs = require('yargs');
const plumber = require('gulp-plumber');
const sass = require('gulp-sass');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const svgmin = require('gulp-svgmin');
const rename = require('gulp-rename');
const babel = require('gulp-babel');
@adeonir
adeonir / gitlab-ci.yml
Created November 28, 2018 11:32
Deploy to FTP using GitLab CI
deploy:
stage: deploy
only:
- master
script:
- apt-get update -qq && apt-get install -qq lftp -y
- lftp -c "set ftp:ssl-allow false; open -u $USERNAME,$PASSWORD $HOST; mirror -Rv dist/ ./public_html --ignore-time -p"
version: '3.5'
services:
database:
image: mariadb:latest
ports:
- 3306:3306
volumes:
- data:/var/lib/mysql
restart: always