Skip to content

Instantly share code, notes, and snippets.

View gblmarquez's full-sized avatar
🏡
Focused on people for growth the business

Gabriel Marquez gblmarquez

🏡
Focused on people for growth the business
View GitHub Profile
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
:: Extract date fields - language dependent
FOR /f "tokens=1-4 delims=/-. " %%i in ('date /t') do (
SET v1=%%i& SET v2=%%j& SET v3=%%k
IF "%%i:~0,1%%" gtr "9" (SET v1=%%j& SET v2=%%k& SET v3=%%l)
FOR /f "skip=1 tokens=2-4 delims=(-)" %%m in ('echo.^|date') do (
@gblmarquez
gblmarquez / Import-ICPBrasil-CertiticateAuthorities-Azure-VMSS.sh
Created June 23, 2018 16:57
Importar Certificados das Autoridades Certificadoras (ACs) da ICP-Brasil no Azure VMSS
az vmss extension set \
--publisher Microsoft.Compute \
--version 1.8 \
--name CustomScriptExtension \
--resource-group myResouce \
--vmss-name myType \
--settings '{"fileUris":["https://gist.githubusercontent.com/gblmarquez/0124ce6e20ffb7883ecc021673c48417/raw/ad0480d25a438512180bd44925f477a9000146e1/Import-ICPBrasil-CertiticateAuthorities.ps1"],"commandToExecute":"powershell.exe -ExecutionPolicy Unrestricted -File Import-ICPBrasil-CertiticateAuthorities.ps1"}'
@gblmarquez
gblmarquez / Import-ICPBrasil-CertiticateAuthorities.ps1
Last active October 4, 2019 12:12
Importar Certificados das Autoridades Certificadoras (ACs) da ICP-Brasil
#
# How to execute
# Using Windows
# PowerShell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/gblmarquez/0124ce6e20ffb7883ecc021673c48417/raw/a403721d0f0abe2a609e312d9d2f74af47dc6514'))"
#
function DownloadWithRetry([string] $Uri, [string] $OutFile, [int] $retries = 5) {
while($true) {
try {
Invoke-WebRequest -Uri $Uri -OutFile $OutFile
@gblmarquez
gblmarquez / countries_codes_and_coordinates.csv
Created October 10, 2017 12:49 — forked from tadast/countries_codes_and_coordinates.csv
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude
Country Alpha-2 code Alpha-3 code Numeric code Latitude (average) Longitude (average)
Afghanistan AF AFG 4 33 65
Albania AL ALB 8 41 20
Algeria DZ DZA 12 28 3
American Samoa AS ASM 16 -14.3333 -170
Andorra AD AND 20 42.5 1.6
Angola AO AGO 24 -12.5 18.5
Anguilla AI AIA 660 18.25 -63.1667
Antarctica AQ ATA 10 -90 0
Antigua and Barbuda AG ATG 28 17.05 -61.8
<#
# TO EXECUTE USE
# Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/gblmarquez/e57c873e491d22cc265a9186da95f9e6/raw/f3f8e1a214595a22f28a52c0dbf4c680378943cd/WS2016Optimisations.ps1'))
####################################################################
# File Name : WS2016Optimisations.ps1 #
# Author : George Spiers with thanks to Keith Campbell #
# for assistance. #
# Email : george@jgspiers.com #
# Twitter : @JGSpiers #
# Website : www.jgspiers.com #
Get-AppxPackage |
Where-Object Name -notlike *Libs* |
Where-Object Name -notlike *Native* |
Where-Object Name -ne Microsoft.WindowsStore |
Where-Object Name -ne Microsoft.DesktopAppInstaller |
Where-Object Name -ne Microsoft.StorePurchaseApp |
Where-Object Name -ne Microsoft.AccountsControl |
Where-Object Name -ne Microsoft.BioEnrollment |
Where-Object Name -ne Microsoft.CredDialogHost |
Where-Object Name -ne Microsoft.LockApp |
@gblmarquez
gblmarquez / win10-dev.md
Created May 18, 2017 13:44 — forked from wsargent/win10-dev.md
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Sadly, much of this pertains to Git, GPG, SSH, and Windows all not working, rather than Windows Subsystem for Linux. There is no unified command line experience for native Windows still -- instead, there's a bunch of different conflicting programs which all bring along their own environment and need to be told about each other.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

default-cache-ttl 900
max-cache-ttl 999999
pinentry-program /usr/local/bin/pinentry-mac
enable-ssh-support
log-file /var/log/gpg-agent.log
@gblmarquez
gblmarquez / gist:e1543e0087c38fa79b4cfc4e0920dc04
Created October 21, 2016 15:57
Aluminum 3-Port USB 3.0 and Ethernet Hub - Upgrade Patch (Mac OS 10.10) Driver
https://d2c6jjk3vnoatm.cloudfront.net/spree/products/accessoies/223/41451F80A088E2F_macos0006-RTUNICv1.0.11.zip
@gblmarquez
gblmarquez / acesso.txt
Created October 5, 2016 18:46
Live TIM Modem acesso
Login: T1m4dm
Senha: @T1m@dml1v@