Skip to content

Instantly share code, notes, and snippets.

View mauriballes's full-sized avatar
😄
Doing Amazing Stuffs!

Mauricio Ballesteros mauriballes

😄
Doing Amazing Stuffs!
View GitHub Profile
@mauriballes
mauriballes / react-native-tricks.md
Last active September 20, 2018 20:05
React Native Tricks
@mauriballes
mauriballes / update-gradle-react-native.md
Last active September 7, 2018 13:13
Update Gradle Version React Native 0.56.0

Update Gradle Version on React Native Project 0.56.0

build.gradle file

buildscript {
    repositories {
        ...
    }
    dependencies {
 classpath 'com.android.tools.build:gradle:3.1.0'
@mauriballes
mauriballes / postgres-create-user.md
Last active September 7, 2018 17:55
Postgres Create Users

Postgres Users

Create User

CREATE USER mynewuser PASSWORD 'mynewpassword';

Drop User

DROP USER mynewuser;
@mauriballes
mauriballes / vagrant-file-ips.yml
Created February 15, 2019 22:06
Vagrant file for Create Vagrant Machines match an IP Address
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.name = "machine-name-virtualbox"
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
@mauriballes
mauriballes / docker-commands.md
Created February 18, 2019 14:22
Docker Commands

List Containers

docker ps

Enter Running Container Bash

docker exec -it [container-id] bash

@mauriballes
mauriballes / flexbox-notes.md
Last active March 18, 2019 22:51
Flexbox Notes

Flexbox Notes

Flex

Father Properties

  • Flex Direction: row | column

    Colocar todos los elementos en la direccion que se les indica. Si es row todos los elementos estaran colocados en una fila y si es column todos los elementos estaran en una columna.

@mauriballes
mauriballes / debian-fix.Dockerfile
Last active February 23, 2024 14:13
Fix problem with apt-get update en Debian Jessie (8)
```docker
# debian jessie or debian 8
FROM debian:jessie
# Fix Repositories from Debian Jessie
RUN echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie main" > /etc/apt/sources.list.d/jessie.list && \
echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list && \
sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list && \
sed -i '/deb http:\/\/deb.debian.org\/debian jessie main/d' /etc/apt/sources.list && \
sed -i '/deb http:\/\/security.debian.org\/debian-security jessie\/updates main/d' /etc/apt/sources.list && \
@mauriballes
mauriballes / check-size-ubuntu.sh
Created June 13, 2019 14:55
Check Disk Size by Folders on Ubuntu
#! /bin/bash
du -cha --max-depth=1 / | grep -E "M|G"
@mauriballes
mauriballes / cipher-ruby-java.md
Created September 6, 2019 16:44
Encrypt (Ruby) and Decrypt (Java Android)

Encrypt

require 'openssl'
require 'json'
require 'base64'

def encrypt(string, pwd)
    salt = OpenSSL::Random.random_bytes(16)

    # prepare cipher for encryption
@mauriballes
mauriballes / cloudSettings
Last active October 31, 2020 23:56
VSCode Configuration
{"lastUpload":"2020-10-31T23:56:02.743Z","extensionVersion":"v3.4.3"}