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 / .editorconfig
Created October 13, 2013 06:36
editorconfig for JS + HTML + CSS
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@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 / git_cheatsheet.md
Last active March 9, 2021 07:10
Brief git command cheatsheet

GIT CHEATSHEET

Basic

  • commit: git commit
  • create branch: git branch <branch-name>
  • switch branch: git checkout <branch-name>
  • move branch: git branch -f
@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 / gist:4129412
Created November 22, 2012 04:25
Git driven website 2

A web-focused Git workflow

After months of looking, struggling through Git-SVN glitches and letting things roll around in my head, I’ve finally arrived at a web-focused Git workflow that’s simple, flexible and easy to use.

Some key advantages:

  • Pushing remote changes automatically updates the live site
  • Server-based site edits won’t break history
  • Simple, no special commit rules or requirements
@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 / gist:4148775
Created November 26, 2012 15:25
Some django cheat sheet listings
@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);