Skip to content

Instantly share code, notes, and snippets.

@bravo-kernel
bravo-kernel / azure-pipelines.yml
Last active April 26, 2024 12:35
Multi-stage Azure Devops Pipeline with cross-platform matrix
# Determines which branch(es) will cause a CI build to be started
trigger:
- master
# Stages precede strategy, in other words each stage can contain a strategy (or multiple or none)
# Full run-cylce described here: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runs?view=azure-devops
stages:
- stage: Prepare
jobs:
- job:
@rponte
rponte / 1-CustomerCreatedEventSqsConsumer.java
Last active April 26, 2024 12:35
Spring Boot: Testing a @SqsListener with TestContainers and LocalStack
package br.com.zup.edu.app2.xxx.samples.aws.sqs;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.Customer;
import br.com.zup.edu.app2.xxx.samples.aws.sqs.model.CustomerRepository;
import io.awspring.cloud.messaging.listener.SqsMessageDeletionPolicy;
import io.awspring.cloud.messaging.listener.annotation.SqsListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.messaging.handler.annotation.Header;
@JBlond
JBlond / bash-colors.md
Last active April 26, 2024 12:34 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@siwalikm
siwalikm / aes-256-cbc.js
Last active April 26, 2024 12:34
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@JonAbrams
JonAbrams / gist:7edaa3545f8fd11a1919
Created July 9, 2015 23:15
How to add getter/setter methods to ES6 classes after the class is created
// Also works for normal methods
class User {
constructor (first, last) {
this.firstName = first;
this.lastName = last;
}
}
Object.defineProperty(User.prototype, 'name', {
get: function () {
@ifguido
ifguido / S3.js
Last active April 26, 2024 12:29
Get file from S3 and download
const AWS = require("aws-sdk");
const s3 = new AWS.S3({
accessKeyId: sails.config.custom.S3key,
secretAccessKey: sails.config.custom.S3secret,
});
function getObjectAsync(params) {
return new Promise((resolve, reject) => {
@laurentperroteau
laurentperroteau / GIT.md
Last active April 26, 2024 12:29
Liste de commande GIT

Git

Lexique :

  • HEAD : la révision courante (normalement le dernier commit)
  • untracked : pas encore versionné
  • unmodified : versionné mais pas modifié
  • modified : ayant des modifications pas encore ajouté au repo local
  • staged : sur le repo local
  • fast-forward (ou ff) : explication
@raveren
raveren / AIO.ahk
Last active April 26, 2024 12:29
My personal autohotkey configuration (used and updated for 10+ years!)
;
; ██╗███╗ ██╗██╗████████╗██╗ █████╗ ██╗ ██╗███████╗███████╗
; ██║████╗ ██║██║╚══██╔══╝██║██╔══██╗██║ ██║╚══███╔╝██╔════╝
; ██║██╔██╗ ██║██║ ██║ ██║███████║██║ ██║ ███╔╝ █████╗
; ██║██║╚██╗██║██║ ██║ ██║██╔══██║██║ ██║ ███╔╝ ██╔══╝
; ██║██║ ╚████║██║ ██║ ██║██║ ██║███████╗██║███████╗███████╗
; ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚══════╝
;
; https://gist.github.com/raveren/bac5196d2063665d2154/edit
;
@tVienonen
tVienonen / Bluetooth LE Dual Boot Connecting guide.md
Created February 23, 2020 17:24
Guide for pairing and connecting Bluetooth LE devices when using Linux and Windows dual boot

Bluetooth LE Dual Boot Connecting guide

  1. Pair and connect on Linux
  2. Pair and connect on Windows
  3. Shut down Bluetooth device
  4. Boot to Linux
  5. Mount Windows partition
  6. Go to <windows-mount>/Windows/System32/config
  7. Run command chntpw -e SYSTEM
  • Install chntpw if it is not available