Skip to content

Instantly share code, notes, and snippets.

View AndyDaSilva52's full-sized avatar
🎯
Focusing

Anderson da Silva AndyDaSilva52

🎯
Focusing
View GitHub Profile
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active May 21, 2024 10:21
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@jherax
jherax / filterArray.js
Last active May 6, 2024 09:35
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@rmetzler
rmetzler / gist:2947828
Created June 18, 2012 10:43
find all non UTF-8 encoded files
find . -type f | xargs -I {} bash -c "iconv -f utf-8 -t utf-16 {} &>/dev/null || echo {}" > utf8_fail
@sivinnguyen
sivinnguyen / wsl2_200915_fix_dns_resolution.md
Last active April 12, 2024 07:30
Fix DNS resolution in WSL2

Error

$ sudo apt-get update
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure in name rerolution

$ host google.com
;; connection timed out; no servers could be reached
@cheynewallace
cheynewallace / ExportSchema.ps1
Last active March 21, 2024 07:08
Export MSSQL schema with PowerShell. This script will export your schema definitions for tables, stored procs, triggers, functions and views to .sql files
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>"
# Start Script
Set-ExecutionPolicy RemoteSigned
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath)
{
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
@ozmoroz
ozmoroz / schema_table_size.sql
Created January 1, 2018 10:53
Show sizes of all tables in an Oracle schema
-- Find the size of all tables in an Oracle schema
-- Script by Sergey Stadnik, http://ozmoroz.com
-- Licensed under CC BY with attribution required
-- Based on Stackoverflow.com discussion
-- http://stackoverflow.com/questions/264914/how-do-i-calculate-tables-size-in-oracle
DEFINE schema_name = 'replace_with_your_schema_name'
SELECT * FROM (
SELECT
@matagus
matagus / APIs-webliography.md
Last active June 24, 2022 00:03
Links to posts, talks and slides talking about API design, arquitecture, testing, tools, etc
@rupakg
rupakg / api-platform-matrix.md
Last active June 24, 2022 00:03
API platforms comparison table
Platform Design Code Gen. Docs Testing Management
3Scale Supports Swagger None ActiveDocs (Swagger compliant) Developer Portal Security, Analytics, Monetization, Dashboard, Traffic Mgmt.
Akana Graphical Designer. Supports Swagger, RAML, WADL, WSDL Build Code Document Developer Portal API Gateway, Security, Analytics, Orchestration, Transformation, Traffic Mgmt.
Apigee Edge UI. Supports OpenAPI Specs None Developer Portal Developer Portal API Gateway, Security, Analytics, Monetization, Orchestration, Transformation, Traffic Mgmt., API Proxy Editor
Boomi Mediate None
@felipe-ssilva
felipe-ssilva / padrao-de-commit.md
Last active March 10, 2022 21:46
export default 'padrao-de-commit' 👩‍💻

😉 Yes, we can! And we must!

Antes de mais nada: todo o trabalho precisa ser "commitado". Sem mais, nem menos. Esse é o primeiro passo.

♻️ Siga os padrões, amiguinho.

Não reinvente a roda e não seja rebelde. Se o projeto que você começou a trabalhar, já tem um padrão definido e que atende a necessidade, não há razão para mudanças drásticas. Se o projeto já tem tempos de vivência, significa que o padrão atual já dá conta do recado (ou ao menos deveria).

🚀 Ao infinito e além!

O ideal para manter o código bem versionado é, para cada mudança, um commit. Seja adição de nova funcionalidade, correção de bug ou até remoção de uma funcionalidade antiga. Isso nos dá a facilidade de usar uma das principais funcionalidades do versionamento: retroceder ao código antes do commit indicado.

Commit