Skip to content

Instantly share code, notes, and snippets.

View omariosouto's full-sized avatar

Mario Souto omariosouto

View GitHub Profile
@omariosouto
omariosouto / aes-cbc.py
Last active April 17, 2023 02:49 — forked from lopes/aes-cbc.py
Simple Python example of AES in CBC mode.
#!/usr/bin/env python3
#
# This is a simple script to encrypt a message using AES
# with CBC mode in Python 3.
# Before running it, you must install pycryptodome:
#
# $ python -m pip install PyCryptodome
#
# Author.: José Lopes
# Date...: 2019-06-14
@omariosouto
omariosouto / gist:8b4a776dae35a85be52c973129623921
Created July 31, 2018 09:33 — forked from palmerj3/gist:8249237
A simple example of a timer using requestAnimationFrame
<html>
<head>
</head>
<body>
<h1 id="display"></h1>
<script type="text/javascript">
(function() {
// Source: http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
@omariosouto
omariosouto / contact-form7.scss
Created March 9, 2016 19:24 — forked from renanlara/contact-form7.scss
Checkbox and Radio Button Custom - Contact Form 7
.wpcf7-checkbox, .radio {
display: block;
margin: 10px 0 0;
.wpcf7-list-item {
display: block;
input[type=checkbox], input[type=radio] {
display: none;
@omariosouto
omariosouto / wp-logged-in.php
Created November 25, 2015 12:35
Exibir conteúdo apenas quando estiver logado no WordPress
<?php if ( is_user_logged_in() ) : ?>
// Aqui vai o conteúdo
<?php endif; ?>
// https://codex.wordpress.org/Function_Reference/is_user_logged_in
@omariosouto
omariosouto / queries.sql
Last active November 4, 2015 15:23 — forked from renanlara/myphpadmin.sql
Atualizar as URLs no Banco de Dados do WordPress
UPDATE wp_options SET option_value = replace(option_value, 'http://url-antiga.com.br', 'http://url-nova.com.br') WHERE option_name = 'home' OR option_name = 'siteurl';
SET SQL_SAFE_UPDATES=0;
UPDATE wp_posts SET guid = replace(guid, 'http://url-antiga.com.br','http://url-nova.com.br');
SET SQL_SAFE_UPDATES=0;
UPDATE wp_posts SET post_content = replace(post_content, 'http://url-antiga.com.br', 'http://url-nova.com.br');
@omariosouto
omariosouto / compilador-sass.md
Created October 23, 2015 12:57 — forked from renanlara/compilador-sass.md
Compilador SASS

Linux / Ubuntu 14.04 LTS

  • Instale o Ruby > $ sudo apt-get install ruby-full
  • Instale o SASS > $ sudo su -c "gem install sass"
  • Instale o Compass -> $ sudo gem install compass

Windows