Skip to content

Instantly share code, notes, and snippets.

@pfrozi
pfrozi / webpack.config.js
Created February 20, 2019 14:30
Webapack config for node
var path = require('path');
var fs = require('fs');
var nodeModules = {};
fs.readdirSync('node_modules')
.filter(function(x) {
return ['.bin'].indexOf(x) === -1;
})
.forEach(function(mod) {
nodeModules[mod] = 'commonjs ' + mod;
@pfrozi
pfrozi / update-all-folders.sh
Created July 17, 2019 15:10
Update all git folders
#!/bin/bash
for p in $(ls); do cd $p && git fetch && git reset --hard && git clean -xfd && git checkout master && git pull origin master && cd ..; done
@pfrozi
pfrozi / ls.sh
Created September 2, 2019 21:00
My extensions
drwxrwxrwx 1 pfrozi pfrozi 4096 Sep 2 17:57 .
drwxrwxrwx 1 pfrozi pfrozi 4096 Oct 2 2017 ..
-rwxrwxrwx 1 pfrozi pfrozi 624 Sep 2 17:58 .obsolete
drwxrwxrwx 1 pfrozi pfrozi 4096 Apr 12 2018 JohnyGeorges.jetjet-theme-1.0.0
drwxrwxrwx 1 pfrozi pfrozi 4096 May 15 17:18 aaron-bond.better-comments-2.0.5
drwxrwxrwx 1 pfrozi pfrozi 4096 Jan 29 2019 abusaidm.html-snippets-0.2.1
drwxrwxrwx 1 pfrozi pfrozi 4096 Jun 27 2018 adamgirton.gloom-0.1.8
drwxrwxrwx 1 pfrozi pfrozi 4096 Sep 2 13:44 ahmadawais.shades-of-purple-5.21.0
drwxrwxrwx 1 pfrozi pfrozi 4096 Feb 12 2019 akamud.vscode-theme-onelight-2.1.0
drwxrwxrwx 1 pfrozi pfrozi 4096 Aug 15 10:33 alefragnani.bookmarks-10.5.0
@pfrozi
pfrozi / code-ext.sh
Created September 6, 2019 17:37
Install vscode extensions by command line
code --list-extensions
code --install-extension ms-vscode.cpptools
code --uninstall-extension ms-vscode.csharp
@pfrozi
pfrozi / az-list-regions.sh
Created October 16, 2019 21:53
List all locations with the name code
az account list-locations -o table
@pfrozi
pfrozi / validate.sh
Created April 22, 2020 15:20
validar schema com o xmllint
xmllint --schema xsd/ACCC406.xsd ACCC406_92874270_20200331_00004.xml --noout
@pfrozi
pfrozi / test.js
Created June 18, 2020 12:31
Verify all events bounden to some element
jQuery._data( document.getElementById('btnPesquisaPickListGrid'), "events" );
@pfrozi
pfrozi / arq.sh
Created July 7, 2020 17:36
Get all commits from a tag
git log --pretty=format:" * [%h](https://gitlab.com/$(git remote get-url origin | sed -r 's/.*\:(.*)\.git.*/\1/')/commit/%h) %s" ^v1.0.2-rc1 HEAD
@pfrozi
pfrozi / test.sh
Created July 7, 2020 17:41
dotnet publish com info de versão
dotnet publish -p:VersionPrefix=1.8.4 -p:VersionSuffix=rc1 -c Release -o staging/ Poc.IdentityServer.ApiA.csproj
@pfrozi
pfrozi / patterns.sh
Created July 7, 2020 17:42
EFCore2 -> EF6
# pattern1
HasColumnType\("(.+)\(([0-9]+)\)"\)
HasColumnType("$1").HasMaxLength($2)
# pattern2
HasColumnType\("(.+)\(([0-9]+)\,\s*([0-9]+)\)"\)
HasColumnType("$1").HasPrecision($2, $3)
# pattern3
HasColumnType\("(.+)\(\,\s*([0-9]+)\)"\)
HasColumnType("$1").HasPrecision(38, $2)