Skip to content

Instantly share code, notes, and snippets.

View juanem1's full-sized avatar

Juan Emilio Turk juanem1

View GitHub Profile
@juanem1
juanem1 / import.sh
Created March 13, 2017 14:08
Import multiple json files to MongoDB
#!/bin/bash
FILES=./*
# loop over all files in this directory
for f in $FILES
do
# Import each file
# Mongoimport will use file name as collection name
mongoimport -h localhost:7880 -d databaseName --file $f
done
@juanem1
juanem1 / docker-clean.sh
Created February 22, 2017 16:47
Remove all images and containers from docker
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@juanem1
juanem1 / mongoimport-export.txt
Last active July 16, 2017 08:02
mongoimport / mongoexport MongoDB
mongoimport
-h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for sets)
-u [ --username ] arg username
-p [ --password ] arg password
-d [ --db ] arg database to use
-c [ --collection ] arg collection to use (some commands)
-f [ --fields ] arg comma separated list of field names e.g. -f name,age
--file arg file to import from; if not specified stdin is used
--drop drop collection first
--upsert insert or update objects that already exist
@juanem1
juanem1 / designer.html
Last active September 7, 2016 14:34
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-pages/core-pages.html">
@juanem1
juanem1 / gist:4c87782bad23f9cd8beb
Last active August 5, 2023 19:19
Install WebStorm 10 in Ubuntu
1.- Install java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Then make sure that the install was successful by running:
java -version
-------------------------------------------------------
@juanem1
juanem1 / bootstrap.sh
Created April 11, 2015 22:20
File to bootstrap your vagrant machine. Front end oriented. :)
#!/usr/bin/env bash
sudo apt-get update
@juanem1
juanem1 / designer.html
Last active August 29, 2015 14:18
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@juanem1
juanem1 / designer.html
Created February 24, 2015 14:43
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>