Skip to content

Instantly share code, notes, and snippets.

View marcorodas's full-sized avatar
🏠
Working from home

Marco Rodas marcorodas

🏠
Working from home
View GitHub Profile
@marcorodas
marcorodas / import.sql
Last active January 28, 2019 04:29
EXCEL CSV
TRUNCATE TABLE dua_xlsx;
LOAD DATA
LOCAL INFILE 'C:\\Users\\skynet\\AppData\\Local\\Temp\\dua_xlsx.csv'
INTO TABLE `file_collection`.`dua_xlsx`
CHARACTER SET latin1
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n'
IGNORE 1 LINES;
SELECT COUNT(*) FROM dua_xlsx;
@marcorodas
marcorodas / Make Diretory With Filenames.bat
Last active January 20, 2019 18:45
Batch directory creation based on filenames in title case
powershell -command "Get-ChildItem . -File | %%{$_.Name.TrimEnd($_.Extension)} | %%{(Get-Culture).TextInfo.ToTitleCase($_.ToLower())} | ForEach-Object {new-item -Name $_ -ItemType directory}"
@echo off
IF EXIST %temp%\command.bat (
DEL %temp%\command.bat
)
SET "JAVA_HOME=C:\Program Files\Java\jdk1.8.0_92"
powershell.exe -Command ^
$title = 'Projects Menu';^
$options = @(^
[PSCustomObject]@{dir = 'Projects_Exe\LoginApp'; title = 'Login App';},^
[PSCustomObject]@{dir = 'Projects_Exe\Expedientes'; title = 'Expedientes';},^
@marcorodas
marcorodas / localRedeploy.js
Created July 13, 2018 19:14
Start Custom Tomcat, Clean and Redeploy
const urlExists = require('url-exists');
const request = require('requestretry');
const spawn = require('child_process').spawn;
const mvn = require('maven').create({
profiles:['development']
});
const url = 'http://localhost:8080';
var cleanRedeploy = function(){
request({
url: url,
@marcorodas
marcorodas / A. IntelliJ IDEA - Plugins
Last active June 26, 2018 20:43
IntelliJ IDEA - Plugins
Database Navigator - https://plugins.jetbrains.com/plugin/1800-database-navigator
Lombok Plugin - https://plugins.jetbrains.com/plugin/6317-lombok-plugin
PlantUML integration - https://plugins.jetbrains.com/plugin/7017-plantuml-integration
ReST Console - https://plugins.jetbrains.com/plugin/8114-rest-console
TeXiFy IDEA - https://plugins.jetbrains.com/plugin/9473-texify-idea
@marcorodas
marcorodas / database.puml
Created June 8, 2018 06:30
Enhanced Entity–Relationship
@startuml
' see: http://plantuml.com/classes.html#More
skinparam LineType ortho
skinparam Shadowing false
skinparam Class {
HeaderBackgroundColor #98BFDA
BackgroundColor White
BorderColor #808080
ArrowColor #8c8c8c
}
@marcorodas
marcorodas / VectorDrawable2Svg.py
Created February 9, 2018 05:18
Android Vector to SVG
"""
VectorDrawable2Svg
This script convert your VectorDrawable to a Svg
Author: Alessandro Lucchet
See: https://gitlab.com/Hyperion777/VectorDrawable2Svg/blob/fac86195ba78f27301a70fb612b7c638f066a335/VectorDrawable2Svg.py
Usage: drop one or more vector drawable onto this script to convert them to svg format
"""
from xml.dom.minidom import *
import sys
@marcorodas
marcorodas / cmdhere.reg
Created August 12, 2017 05:35
Add Command Prompt to the Context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command]
@="cmd.exe /s /k pushd \"%V\""
@marcorodas
marcorodas / .gitignore
Last active February 8, 2019 17:46
Invocar desde WIN + R. Copiar a %USERPROFILE%
# Ignore everything
*
# Don't ignore .gitignore
!.gitignore
# Don't ignore gist
!package.json