Skip to content

Instantly share code, notes, and snippets.

View mazulo's full-sized avatar
🐍
Pythoning

Patrick Mazulo mazulo

🐍
Pythoning
View GitHub Profile
<?php if (comments_open()) : ?>
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '<example>'; // Required - Replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
@mazulo
mazulo / anchor
Last active August 29, 2015 14:08
Create anchor link animated.
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html,body').animate({
scrollTop: target.offset().top
}, 1000);
return false;
@mazulo
mazulo / LinksParaApresentação
Created March 27, 2014 21:22
O que usar na apresentação da aula de P.P.O.O
Explicando o que é PlantUML → http://www.mediawiki.org/wiki/Extension:PlantUML
Documentação Caso de Uso → http://plantuml.sourceforge.net/usecase.html
Mostrando como rodar → http://plantuml.sourceforge.net/running.html
Os que eu uso para rodar:
→ http://www.codeuml.com/
→ http://www.planttext.com/planttext
@mazulo
mazulo / SettingsUser
Created March 21, 2014 06:14
Arquivo de configuração das personalizações do meu sublime
{
"auto_complete_triggers":
[
{
"characters": ".",
"selector": "source.python - string - comment - constant.numeric"
}
],
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"font_size": 11,
@mazulo
mazulo / UseCaseLinkLibrarySignInSearch
Last active August 29, 2015 13:57
Caso de uso de cadastro de usuário. e consulta/cadastro de links.
@startuml
left to right direction
:USUARIO:
rectangle cadastro {
:USUARIO: -- (CADASTRAR CONTA)
(CADASTRAR CONTA) ...|> (AUTENTICAR CONTA) : include
(CADASTRAR CONTA) <-- (CONTA COM FACEBOOK)
(CADASTRAR CONTA) <-- (CONTA COM TWITTER)
}
@mazulo
mazulo / gist:9194880
Created February 24, 2014 19:12
Capturar uma screenshot da tela em um dado intervalo de tempo
import pyscreenshot as ImageGrab
from time import strftime
import time
hora_atual = strftime('%H:%M')
i = 0
while hora_atual != '15:54':
ImageGrab.grab_to_file('img-%d.png' % i)
@mazulo
mazulo / gist:9008601
Last active August 29, 2015 13:56
Form de pesquisa (funcionando em posts e page-custom)
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</div>
</form>
@mazulo
mazulo / gist:9007561
Last active August 29, 2015 13:56
Como pegar o nome de uma categoria, no loop dentro de um template personalizado
<?php
$categoria = get_the_category();
$nomeCategoria = $categoria[0]->cat_name;
?>
<h2>notícias <?php echo $nomeCategoria; ?> </h2>