Skip to content

Instantly share code, notes, and snippets.

View josecostamartins's full-sized avatar

José Augusto Costa Martins Jr. josecostamartins

View GitHub Profile
@josecostamartins
josecostamartins / karabiner.json
Last active October 22, 2017 01:35
Karabiner Personal Configuration
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
for FILE in *.jpg; do
echo "Processing file: $FILE"
WIDTH=`identify $FILE | awk '{split($3,a,"x"); print a[1]}'`
HEIGHT=`identify $FILE | awk '{split($3,a,"x"); print a[2]}'`
if [ "$WIDTH" -gt 1024 -o "$HEIGHT" -gt 1024 ]; then
if [ "$WIDTH" -gt "$HEIGHT" ]; then
RATIO=$(echo 1024/$WIDTH | bc -l)
else
@josecostamartins
josecostamartins / BlurredNetworkImageView.java
Last active August 29, 2015 14:14
BlurredImageViewNetwork from volley network library
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.support.v8.renderscript.Allocation;
import android.support.v8.renderscript.Element;
import android.support.v8.renderscript.RenderScript;
import android.support.v8.renderscript.ScriptIntrinsicBlur;
package net.colaborativa.exampleapp.api;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Arrays;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import com.facebook.Request;
import com.facebook.Response;
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@josecostamartins
josecostamartins / ffmpegScript
Last active January 20, 2016 09:19
# This script converts any format to xvid avi currently xvid avi is the only format my DVD player accepts and the newest versions of movies are being launched in x264 mp4
#!/bin/bash
# This script converts any format to xvid avi
# currently xvid avi is the only format my DVD player accepts
# and the newest versions of movies are being launched in x264 mp4
USAGE="$(basename $0) Input [output]"
#filename=$(basename $pathandfile)
#extension=${filename##*.}