Skip to content

Instantly share code, notes, and snippets.

View leokovaski's full-sized avatar

Léo Kovaski leokovaski

  • São Paulo - Brazil
View GitHub Profile
@leokovaski
leokovaski / permissions.sh
Created June 19, 2018 16:51
Permissions for Mautic
cd /var/www/mautic
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R g+w app/cache/
chmod -R g+w app/logs/
chmod -R g+w app/config/
chmod -R g+w media/files/
chmod -R g+w media/images/
chmod -R g+w translations/
chown -R $USER:www-data .
@leokovaski
leokovaski / combo_dinamico.html
Created July 16, 2017 17:20 — forked from ografael/combo_dinamico.html
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@leokovaski
leokovaski / exemplo.php
Created May 2, 2017 17:51 — forked from maiconschmitz/exemplo.php
Classe para encurtar URL utilizando o Google url shortener
include "googl.php";
$googl = new Googl();
$googl->setChave("");
$retorno = $googl->encurtarUrl("http://www.maiconschmitz.com.br");
echo "URL encurtada: " . $retorno->id;
@leokovaski
leokovaski / dribbble.css
Created March 17, 2017 18:38
Create social media buttons with CSS3 gradients.
/*
Dribbble
------------------------------------------------------------ */
a.button-dribbble {
background-color: #c93764; /* fallback color */
background: -moz-linear-gradient(top, #ea4c89, #c93764);
background: -ms-linear-gradient(top, #ea4c89, #c93764);
background: -webkit-linear-gradient(top, #ea4c89, #c93764);
border: 1px solid #c93764;
@leokovaski
leokovaski / gist:b1bd12fe7bb697ae4ec5685d7e539339
Created February 23, 2017 18:02 — forked from betweenbrain/gist:5405671
Use cURL and SimpleXML to retrieve and parse Wordpress RSS feed
<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
CURLOPT_URL => 'http://blogs.guggenheim.org/map/feed/',
CURLOPT_USERAGENT => 'spider',
CURLOPT_TIMEOUT => 120,
CURLOPT_CONNECTTIMEOUT => 30,
CURLOPT_RETURNTRANSFER => TRUE,