Skip to content

Instantly share code, notes, and snippets.

View gustavorps's full-sized avatar

Gustavo RPS gustavorps

View GitHub Profile
-- After migrating a WordPress site to a new URL either live or to a production or development server,
-- the new URL strings in the mysql database need to be changed and updated in the various mysql database tables.
-- This method just uses the whole mysql database rather than a WordPress export/import from within,
-- and is best suited for a straight swap. So you would copy all the WordPress files/folders to the
-- new destination, set the correct ownership to those files = then do the database switcheroo.
-- Do a mysql database export of the old database on the old server, create a new blank database
-- on the new server, import the old data either in phpmyadmin or mysql directly in the command line.
import java.util.Map;
import java.util.Comparator;
import java.util.Collections;
int index = 0;
// sprite sheet
PImage pokemon;
// current pokemon sprite
PImage current;
// current pie chart
Verifying I am +gustavorps on my passcard. https://onename.com/gustavorps
@gustavorps
gustavorps / proponente.json
Created July 29, 2015 18:39
NeoSalic - Models
{
"name": "Proponente,",
"description": "TODO: O que é?",
"plural": "proponentes",
"base": "User",
"idInjection": false,
"strict": true,
"options": {
"mongodb": {
"collection": "agentes",
@gustavorps
gustavorps / question.md
Last active August 29, 2015 14:27
Question - MongoDB for Time Series Data: Schema Design

How this schema is possible in JSON?

{
  speed: { 0: 63, 1: 58, .., 58: 66, 59: 64}
}

Because... you know... EMACS... first char cannot be a number.

Or I should read like this?

@gustavorps
gustavorps / linux-tips-tricks-faq.md
Last active August 29, 2015 14:27
Linux - Tips, Tricks and FAQ

Linux - Tips, Tricks and FAQ

Network Manager

WiFi manager from command line

Debian and Ubuntu Based

nmcli is a command‐line tool for controlling NetworkManager.

@gustavorps
gustavorps / facebook-api-tips-and-tricks-url.md
Last active September 15, 2015 21:47
Facebook API Tips & Ticks

URLs & Post with URL embed

Using link_stat of FQL Query to count shares, likes, comments and clicks

SELECT comments_fbid, url, normalized_url, share_count, like_count, comment_count, total_count, commentsbox_count, click_count 
FROM link_stat 
WHERE url = "URL_AT_FACEBOOK"

Output exemple

@gustavorps
gustavorps / master-root-serf_log
Last active September 18, 2015 16:19
kiwenlau/hadoop-cluster-docker Issues: Problems to connect on master when run "./run-wordcount.sh" on master
==> Starting Serf agent...
==> Starting Serf agent RPC...
==> Serf agent running!
Node name: 'master.kiwenlau.com'
Bind addr: '0.0.0.0:7946'
RPC addr: '0.0.0.0:7373'
Encrypted: false
Snapshot: false
Profile: lan
@gustavorps
gustavorps / rasbian-on-docker.md
Created September 23, 2015 04:49
Rasbian on Docker

Tecnologias

Ubuntu, eu usei o ele para fazer a demonstração desse projeto

Docker é uma plataforma aberta para desenvolvedores e administradores de sistemas fazer build, ship e run aplicações distribuidas.

QEMU é emulador e simulador de maquinas generico open source

Vamos combinar Docker e QEMU para rodar o Rasbian em plataformas X86 ou AMD64 e construir uma image do Docker que tenha seu programa que possa rodar no RPi (ARMv6) and RPi 2 (ARMv7).