Skip to content

Instantly share code, notes, and snippets.

View marti1125's full-sized avatar
🐍

Willy Aguirre marti1125

🐍
View GitHub Profile
@AmirSoleimani
AmirSoleimani / main.go
Last active January 10, 2023 08:18
Pub/Sub Pattern Golang
package main
import (
"patternsample/mq"
"fmt"
"time"
)
func main() {
@AlexanderGrom
AlexanderGrom / specification.go
Last active March 16, 2024 21:20
Golang Pattern Specification (sketch)
// Pattern Specification
//
// In the following example, we are retrieving invoices and sending them to a collection agency if
// 1. they are overdue,
// 2. notices have been sent, and
// 3. they are not already with the collection agency.
// This example is meant to show the end result of how the logic is 'chained' together.
//
// This usage example assumes a previously defined OverdueSpecification class
// that is satisfied when an invoice's due date is 30 days or older,
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@DinoChiesa
DinoChiesa / httpsig-in-postman-pre-request-script.js
Created January 26, 2016 23:18
pre-request script for Postman, to perform HttpSignature calculation. Also SHA-256 message digest.
function computeHttpSignature(config, headerHash) {
var template = 'keyId="${keyId}",algorithm="${algorithm}",headers="${headers}",signature="${signature}"',
sig = template;
// compute sig here
var signingBase = '';
config.headers.forEach(function(h){
if (signingBase !== '') { signingBase += '\n'; }
signingBase += h.toLowerCase() + ": " + headerHash[h];
});
@nonbeing
nonbeing / using_meld_on_mac.md
Created October 12, 2015 05:17 — forked from p1nox/using_meld_on_mac.md
Using meld on Mac

Using Meld merging tool on Mac

  1. Install XQuartz

  2. Install meld with brew

     brew install meld
    
  3. Copy PYTHONPATH

@tommypeps
tommypeps / regex name
Created September 25, 2015 12:59
Expresion regular para nombres con todo tipo de acentos
@"[ A-Za-zäÄëËïÏöÖüÜáéíóúáéíóúÁÉÍÓÚÂÊÎÔÛâêîôûàèìòùÀÈÌÒÙ.-]+"
@AllThingsSmitty
AllThingsSmitty / apple-mq.css
Last active June 23, 2022 19:56
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@denji
denji / golang-tls.md
Last active March 29, 2024 03:03 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@barahilia
barahilia / run-jasmine.js
Last active March 24, 2022 11:38 — forked from dlidstrom/run-jasmine.js
Runs Jasmine tests using PhantomJS. Adapted for use within TeamCity..Compatible with Jasmine 2.0.
var system = require('system'),
env = system.env;
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
*
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
@captainbrosset
captainbrosset / gist:6681978
Last active December 23, 2015 19:19
Firefox DevTools doorhangers

DevTools Doorhangers

Goal

Provide rich preview or interaction about inspected objects across the DevTools, in the form of floating popups.

Yay! Screenshots!

These are for illustration only, just cause a picture is worth a thousand words, however final implementation may differ.

color preview