Skip to content

Instantly share code, notes, and snippets.

View jorandradefig's full-sized avatar

Jorge Andrade jorandradefig

View GitHub Profile
@jorandradefig
jorandradefig / inai_solicitudes.R
Created May 18, 2018 20:37
Solicitudes - INAI (Descargar todos los metadatos)
rm(list=ls())
setwd("~")
library(jsonlite)
pageSize <- 10000
total <- 9620
for (i in 1:total){
print(i)
@jorandradefig
jorandradefig / inai_solicitudes.sh
Last active September 9, 2020 23:59
Solicitudes - INAI (Descargar todos los metadatos)
#!/bin/bash
# brew install jq
# apt-get install jq
# yum install jq
pageSize=100
total=962000
for i in `seq 0 1 $total`
@jorandradefig
jorandradefig / gist:147d03f1fc96047e3745541732fd5019
Created May 16, 2018 15:24
Enable/Disable ext4 dir_index feature
sudo tune2fs -O ^dir_index /dev/xvda1
sudo tune2fs -O dir_index /dev/xvda1
@jorandradefig
jorandradefig / countries_en.json
Last active April 27, 2018 19:31
List of Countries of the World - JSON Format - EN/ES
{
"countries": [{
"iso": "AF",
"name": "Afghanistan",
"code": "+93"
},
{
"iso": "AL",
"name": "Albania",
"code": "+355"
@jorandradefig
jorandradefig / .editorconfig
Last active March 16, 2018 05:38
EditorConfig Template
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
brew update
brew install maven
@jorandradefig
jorandradefig / gist:bd0eb7d71b23ca0991760acd40f39009
Last active November 12, 2021 06:22
React-Leaflet Add Marker on Click
const React = window.React;
const { Map, TileLayer, Marker, Popup } = window.ReactLeaflet;
const style = {
map: {
height: '400px',
width: '100%'
}
}

Install the MongoDB Binaries

brew install mongodb

Create the data directory

mkdir -p /data/db

Set permissions for the data directory

brew install python3
pip3 install pylint
pip3 install awscli
pip3 install boto3
import signal
import sys
from time import sleep
SIGINT = False
def signal_handler(signal, frame):
print('Ctrl + C received...')
global SIGINT
SIGINT = True