This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Busca por nome de objeto | |
SELECT | |
cast( | |
O.NAME as varchar | |
) AS NOME_OBJETO, | |
cast( | |
O.type_desc as varchar | |
) AS TIPO_OBJETO | |
FROM | |
SYS.OBJECTS O |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int size = 100000; | |
long start; | |
List<string> list = new List<string>(size); | |
for(var i = 0; i < size; i++) | |
list.Add($"string_{i}"); | |
Console.WriteLine("Aggregate string:"); | |
start = DateTime.Now.Ticks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PorExtenso | |
{ | |
public class Program { | |
public static void Main(){ | |
decimal x = 10011.56m; | |
Console.WriteLine(x.PorExtenso()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\[Column\(\"(.+)\".+\"(.+)\"\)\]\n.+public.+\s(.+)\s\{.+\} | |
modelBuilder.Property(e => e.$3)\n .HasColumnName("$1")\n .HasColumnType("$2"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install ubuntu in virtual machine | |
# https://ubuntuforums.org/showthread.php?t=1481300 | |
# Get arch type of ubuntu | |
# i686 = 32 bit | |
# x86_64 = 64 bit | |
uname -m | |
# download forticlient | |
https://hadler.me/linux/forticlient-sslvpn-deb-packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script=scripts_complete.sql | |
rm -f $script | |
for item in $(git diff-tree --name-only --no-commit-id -r master branch_with_new_scripts | grep ".sql"); do | |
cat $item >> $script | |
echo >> $script | |
echo GO >> $script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# $1: base path | |
# $2: vendor name (lowercase) | |
# $3: new vendor name (lowercase) | |
# Sample: bash find-and-move.sh ~/workspace/company company company2 | |
path=$1 | |
vendor=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -i INPUT_FILE -e OUTPUT_CHARSET -o OUTPUT_FILE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXEC dbo.sp_add_job | |
@job_name = N'NameOfJob' ; | |
GO | |
EXEC sp_add_jobstep | |
@job_name = N'NameOfJob', | |
@step_name = N'Description of job step.', | |
@subsystem = N'TSQL', | |
@command = N'EXEC SP_MYJOB ''A'',''B'',''C'' ', | |
@retry_attempts = 5, | |
@retry_interval = 5 ; |