Skip to content

Instantly share code, notes, and snippets.

View ranisalt's full-sized avatar

Ranieri Althoff ranisalt

View GitHub Profile
@ranisalt
ranisalt / usr-share-makepkg-tidy-jpegoptim.sh
Created April 4, 2018 02:57
Apply jpegoptim on makepkg (similar to optipng)
#!/usr/bin/bash
#
# jpegoptim.sh - Compress JPG files using jpegoptim
#
# Copyright (c) 2015-2016 Pacman Development Team <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

Este tutorial é referente a um servidor executando Ubuntu 16.04.4 LTS. Todos os passos acompanham um shell script equivalente.

Instalar dependências do sistema

Instalaremos o banco de dados, o git e bibliotecas que futuramente serão usadas para compilar as dependências do Helios.

$ sudo apt install gettext git libldap2-dev libpq-dev libsasl2-dev nginx postgresql python-pip python-virtualenv uwsgi uwsgi-plugin-python

PostgreSQL

@ranisalt
ranisalt / odroid.sh
Created January 29, 2018 15:27
Odroid-C2 installer
#!/bin/bash
KEYMAP='br-abnt2'
LOCALE='pt_BR'
SESSION='cinnamon'
TIMEZONE='America/Sao_Paulo'
PACKAGES=('bash-completion'
'chromium'
'file-roller'
'git'
'gnome-keyring'

Arduino IDE + Intel Galileo

Para instalar o Arduino IDE no Arch Linux e derivados, usar o pacote arduino:

pacman -S arduino

A IDE será aberta com o comando arduino.

@ranisalt
ranisalt / xtea-test.cpp
Last active September 20, 2020 16:23
SIMD vectorized XTEA
#include "xtea.h"
#include <algorithm>
#include <array>
#include <cassert>
#include <chrono>
#include <iostream>
constexpr auto VECTOR_SIZE = 24584u;
// 48*64bytes + 3*16bytes + 3*4bytes + 3bytes, worst size possible
@ranisalt
ranisalt / bool2str.cpp
Created July 31, 2017 19:48
bool to str benchmark
#include <assert.h>
#include <chrono>
#include <iostream>
#include <sstream>
using namespace std::chrono;
constexpr auto SAMPLES = 100'000u;
auto curr_time()
{
@ranisalt
ranisalt / debug.h
Created March 28, 2017 00:20
Quantum debug
#ifndef QUANTUM_DEBUG_H
#define QUANTUM_DEBUG_H
#include <iostream>
#include <string>
#include <vector>
namespace quantum {
namespace tools {
namespace detail {
From c0fe27dd63b02af2413ad112150652328a98eb75 Mon Sep 17 00:00:00 2001
From: Ranieri Althoff <[email protected]>
Date: Fri, 10 Jul 2015 03:43:51 -0300
Subject: [PATCH] Add callback for places discovery on walking
---
data/creaturescripts/creaturescripts.xml | 1 +
data/creaturescripts/scripts/walk.lua | 25 ++++++++++++++++++++
data/global.lua | 8 +++++++
src/creatureevent.cpp | 39 ++++++++++++++++++++++++++++++++

Keybase proof

I hereby claim:

  • I am ranisalt on github.
  • I am ranisalt (https://keybase.io/ranisalt) on keybase.
  • I have a public key whose fingerprint is 70DC B319 C9A8 D917 E107 EDCA 8D55 C020 4F3B CF42

To claim this, I am signing this object:

@ranisalt
ranisalt / debug.h
Created August 24, 2016 05:46
C++ version of visionmedia/debug
#ifndef QUANTUM_DEBUG_H
#define QUANTUM_DEBUG_H
#include <iostream>
#include <string>
#include <vector>
namespace quantum {
namespace tools {
namespace detail {