Skip to content

Instantly share code, notes, and snippets.

View marcoslhc's full-sized avatar
🏳️‍🌈
He's like the rainbow

Marcos Hernández marcoslhc

🏳️‍🌈
He's like the rainbow
View GitHub Profile
@marcoslhc
marcoslhc / export-fastlane-match.rb
Created February 23, 2024 16:18 — forked from sbycrosz/export-fastlane-match.rb
Export fastlane match signing credentials for AppCenter
# Export iOS code signing as p12 and mobileprovision file for usage in Appcenter
# Manual decryption as described on https://docs.fastlane.tools/actions/match/
desc "Export fastlane match signing credentials for AppCenter"
lane :export_code_signing do
ensure_env_vars(
env_vars: [
"MATCH_GIT_URL",
"MATCH_PASSWORD",
]
@marcoslhc
marcoslhc / main.go
Created October 3, 2023 16:06
Golang Service Provision Pattern
package main
// Service Provision Pattern
// taken from https://github.com/andygrunwald/go-jira/blob/main/cloud/jira.go
// test this code in
// https://go.dev/play/p/-BUVpELm5u8
import (

Root Cause Analysis

This template is thought for backwards analyisis of an incident,
trying to move recursively in causes asking: "what caused this
effect?" and substituting effect for cause until you reach a
satisfactory point.

Sequence of Events

A brief, time based sequential account of the events leading to

@marcoslhc
marcoslhc / token.php
Created July 29, 2020 23:03 — forked from patrickbussmann/token.php
Sign in with Apple - PHP
<?php
# composer require web-token/jwt-framework
require_once 'vendor/autoload.php';
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\KeyManagement\JWKFactory;
use Jose\Component\Signature\Algorithm\ES256;
use Jose\Component\Signature\JWSBuilder;
use Jose\Component\Signature\Serializer\CompactSerializer;
@marcoslhc
marcoslhc / CurlLoggingInterceptor.java
Created July 6, 2018 20:58 — forked from jgilfelt/CurlLoggingInterceptor.java
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@marcoslhc
marcoslhc / example.js
Created March 1, 2018 03:44
resolve files from node_modules
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
@marcoslhc
marcoslhc / reduxSelectorPattern.md
Created December 22, 2017 04:15 — forked from abhiaiyer91/reduxSelectorPattern.md
Redux Selector Pattern

Redux Selector Pattern

Imagine we have a reducer to control a list of items:

function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
  switch(action.type) {
    case 'SHOW_ALL_ITEMS':
      return action.data.items
    default:
@marcoslhc
marcoslhc / affix.js
Last active December 6, 2017 21:54
Simple affix
var lastKnownScroll = 0;
var ticking = false;
var getPaddingTop = function(elm) {
return Number(
window
.getComputedStyle(elm)
.getPropertyValue("padding-top")
.slice(0, -2)
);
};
@marcoslhc
marcoslhc / axios-instance-config.js
Created July 8, 2017 12:48 — forked from ccnokes/axios-instance-config.js
Good default configuration for axios in node.js
const axios = require('axios');
const http = require('http');
const https = require('https');
module.exports = axios.create({
//60 sec timeout
timeout: 60000,
//keepAlive pools and reuses TCP connections, so it's faster
httpAgent: new http.Agent({ keepAlive: true }),
@marcoslhc
marcoslhc / bash_test.sh
Created April 29, 2017 13:39
test bash remote installer
echo "Marcos! Hello from github!!!"