Skip to content

Instantly share code, notes, and snippets.

[{
"id": "advertisements",
"name": "Anúncios",
"configurationSchemaSets": [],
"isSingleton": true
}]
[
{
"name": "ProductsShelf",
"schema": {
"title": "Vitrine de produtos",
"description": "Vitrine de produtos",
"type": "object",
"required": ["title"],
"properties": {
"title": {
@mateuspontes
mateuspontes / migrate-fish-history-to-zsh.py
Created April 7, 2018 19:57
Migrate fish history to zsh shell (python 2.7)
import os
import re
def fish_to_zsh(cmd):
return (cmd.replace('; and ', '&&')
.replace('; or ', '||'))
with open(os.path.expanduser('~/.zsh_history.test'), 'a') as o:
with open(os.path.expanduser('~/.local/share/fish/fish_history')) as f:
for line in f:
@mateuspontes
mateuspontes / gugoupi.js
Last active August 29, 2015 14:23
GugouPI
var irc = require("irc");
var google = require('google')
var config = {
channels: ["##gurupi"],
server: "irc.freenode.net",
botName: "gugoupi"
};
var bot = new irc.Client(config.server, config.botName, {
@mateuspontes
mateuspontes / mechanize_bible.rb
Created November 7, 2012 03:19
Bible mechanized
require 'rubygems'
require 'mechanize'
agent = Mechanize.new
# params
book = "sl"
chapter = "100"
verse = [1,2,3,4]
text = []
@mateuspontes
mateuspontes / .htaccess
Created February 2, 2012 18:09
htaccess para remover index.php do CodeIgniter
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php)
RewriteRule ^(.*)$ index.php/$1 [L]
@mateuspontes
mateuspontes / gist:1070132
Created July 7, 2011 18:10
FadeIn nas imagens depois do load
<html>
<head>
<title>FadeIn images after loaded with jQuery</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("img").each(function(){
$(this).css({opacity: 0}).bind('load', function(){
$(this).animate({opacity: 1}, 'slow');
@mateuspontes
mateuspontes / gist:955273
Created May 4, 2011 14:06
CSS Comentários - MacMagazine like
.comentarios {
background: url("http://macmagazine.com.br/wp-content/themes/macmagazine/images/bgComentarios.gif") repeat-x scroll center center transparent;
border: 3px solid white;
border-radius: 30px;
box-shadow: 0 2px 5px #333333;
display: block;
font-size: 13px;
font-weight: 500;
height: 21px;
left: -5px;
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, figure, footer, header, hgroup, menu, nav, section, menu,