Skip to content

Instantly share code, notes, and snippets.

View mdumrauf's full-sized avatar

Matías Dumrauf mdumrauf

  • Buenos Aires, Argentina
View GitHub Profile
@mdumrauf
mdumrauf / MapsDownloadService.java
Last active September 21, 2021 12:21
Download + Unzip example in Android
package zzz.yyy.xxx.network.service;
import org.json.JSONObject;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
public interface MapsDownloadService {
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/mdumrauf/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
@mdumrauf
mdumrauf / shadow.xml
Created September 3, 2017 06:16 — forked from lecho/shadow.xml
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@mdumrauf
mdumrauf / .gitconfig
Last active September 29, 2015 02:02
Git config file
[alias]
ft = fetch
ftp = fetch -p
st = status
ci = commit
cim = commit -m
ciam = commit -a -m
cp = cherry-pick
rb = rebase
rbi = rebase -i
@mdumrauf
mdumrauf / Default.sublime-keymap
Created June 15, 2015 18:39
Key bindings for Sublime Text 3
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
]
@mdumrauf
mdumrauf / Preferences.sublime-settings
Last active October 2, 2015 19:36
Sublime Text 3 prefs
{
"binary_file_patterns":
[
"dist",
"node_modules/*",
"bower_components/*",
"coverage/*",
"logs/",
"*.jpg",
"*.jpeg",
@mdumrauf
mdumrauf / connect.sh
Last active September 10, 2015 01:08
Utility script for connecting to EC2 instances
#/bin/sh
INSTANCE=$1
if [ -z $INSTANCE ]; then
printf 'Usage: connect [instance]\n'
echo '[instance] : nginx | production | staging | mongo | what'
exit 1;
fi
if [ $INSTANCE != 'what' ]; then printf "Connecting to $INSTANCE\n"; fi
@mdumrauf
mdumrauf / install.sh
Last active February 12, 2016 13:39
Install script for a fresh Ubuntu-like OS installation
#!/usr/bin/bash
# dev basics
sudo apt-get install curl vim ssh git-core xclip sublime-text build-essential openssl libssl-dev ia32-libs &&
# nvm & node.js
curl https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash &&
source ~/.bashrc &&
nvm install 4.3 &&
@mdumrauf
mdumrauf / dimensizer.rb
Last active September 26, 2016 08:19
Script to change dimens.xml sizes
# Factor to apply to all dimens
factor = 2
text = File.open('dimens.xml').read
resized = File.open('dimens-resized.xml', 'w')
text.gsub!(/\r\n?/, "\n")
resized.write "<resources>\n"
text.each_line do |line|
@mdumrauf
mdumrauf / db_multiverse_downloader.ps1
Created November 22, 2013 01:43
Script written in PowerShell that downloads all DB Multiverse manga pages
echo "Downlading.."
$file = ""
$client = new-object System.Net.WebClient
for($i = 1; $i -le 797; $i++)
{
if ($i -lt 10) { $file = "000$($i)" }
elseif (($i / 10) -lt 10) { $file = "00$($i)" }