Skip to content

Instantly share code, notes, and snippets.

Miguel David minac

Block or report user

Report or block minac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gitflow.sh
#!/bin/bash
## Originally Lee Jones's workflow, adapted to Miguel David on 12/07/2019
# My general workflow is:
#
# 1. `branch-me [name of new branch]` - this creates a new branch with my initials prefixed and replaces
# spaces with hyphens
# 2. I make changes to the codebase and commit my work.
# 3. `merge-me` - pushes the current branch and opens the GitHub PR page - it attempts to set a human friendly
# title (e.g. removes my initials, removes hyphens, capitalizes each word)
@minac
minac / recommendationsforportugal.md
Last active Mar 26, 2019
Recommendations for Portugal
View recommendationsforportugal.md

Recommendations for Portugal

Carly and I are fortunate enough to know people from different parts of the World. Since Portugal and specifically Porto became famous in the tourist circuit we keep getting asked for recommendations, so we joined together a bunch of things we had written to different friends and make it a blog post so that it's easily shareable. We hope it is useful for you. If you like it then (shameless plug), consider coming on one of our food tours in Porto to get to know the local culture through food and wine with amazing guides.

DISCLAIMER: This is Carly and Miguel's research and opinion, not Taste Porto's, nor any formal guidebooks. Different people think and prefer different things, so proceed as you will.

Portugal sea and surf

The sea/ocean off the western coast of Portugal is cold year round, the Atlantic has no warm currents here, and there is a frequent nortada (north wind) which makes swimming quite cold. The positive side of it is that

View lambda-delete-old-snaps-from-our-instance-only
// Browse through ALL snapshots
for (var i = 0; i < data.instanceSnapshots.length; i++) {
var backupFromInstance = data.instanceSnapshots[i].fromInstanceName;
backupDate = new Date(data.instanceSnapshots[i].createdAt);
backupDaysTillNow = Math.floor((now - backupDate) / oneDay);
// Select the ones from our instance alone
if (backupFromInstance == instanceName) {
// Select old snapshots
if (backupDaysTillNow > backupDaysMax) {
View gist:9b6a7c01d42f7d387eeae0e83abbff4d
- basicSSHUserPrivateKey:
scope: GLOBAL
id: myssh
username: myuser
passphrase: ""
description: "myssh"
privateKeySource:
directEntry:
privateKey: {{ my_ssh_key }}
View gist:0fae4d9a51f6833fc4040896458ad30a
stethoscope-app (master) $ yarn start
yarn run v1.12.3
$ nf start -p 12000
[OKAY] Loaded ENV .env File as KEY=VALUE Format
11:51:54 electron.1 | npm
11:51:54 electron.1 | WARN lifecycle The node binary used for scripts is /var/folders/y3/1_12qtq13xg1bw7tn8llmdtw0000gn/T/yarn--1541764312058-0.12696208982929513/node but npm is using /usr/local/Cellar/node/11.1.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
11:51:54 react.1 | npm WARN lifecycle The node binary used for scripts is /var/folders/y3/1_12qtq13xg1bw7tn8llmdtw0000gn/T/yarn--1541764312058-0.12696208982929513/node but npm is using /usr/local/Cellar/node/11.1.0/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
11:51:54 electron.1 | > Stethoscope@2.1.0 electron:start /Users/migueldavid/Downloads/stethoscope-app
11:51:54 electron.1 | > node src/start-react
11:51:54 react.1 | > Ste
View jenkins-casc
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-configuration-as-code
data:
configuration-as-code.yaml: |
jenkins:
systemMessage: "Jenkins managed by Configuration as Code"
numExecutors: 0
View helmvalues
Master:
...
ContainerEnv:
- name: CASC_JENKINS_CONFIG
value: /var/jenkins_home/casc_configs/configuration-as-code.yaml
...
Persistence:
Enabled: true
ExistingClaim: "jenkins-home-pvc"
volumes:
View configmap
---
apiVersion: v1
kind: ConfigMap
metadata:
name: jenkins-configuration-as-code
data:
configuration-as-code.yaml: |
jenkins:
systemMessage: "Jenkins managed by Configuration as Code"
View gist:5b2b46391737c7967364e241b3fcafab
ubuntu@ip-10-0-1-227:~$ kubectl describe pod/opinionated-echidna-jenkins-7db5f685c9-2pwbt
Name: opinionated-echidna-jenkins-7db5f685c9-2pwbt
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: ip-10-0-1-214.eu-west-1.compute.internal/10.0.1.214
Start Time: Mon, 08 Oct 2018 18:21:20 +0000
Labels: app=opinionated-echidna-jenkins
chart=jenkins-0.19.0
component=opinionated-echidna-jenkins-master
View gist:382f5361324d924238ce09bb049c8db1
3m Normal SuccessfulCreate ReplicaSet Created pod: opinionated-echidna-jenkins-7db5f685c9-2pwbt
2m54s Warning FailedScheduling Pod pod has unbound immediate PersistentVolumeClaims
3m Normal EnsuringLoadBalancer Service Ensuring load balancer
3m Normal ScalingReplicaSet Deployment Scaled up replica set opinionated-echidna-jenkins-7db5f685c9 to 1
2m59s Normal EnsuredLoadBalancer Service Ensured load balancer
2m50s Warning FailedAttachVolume Pod AttachVolume.Attach failed for volume "pvc-f0db059b-cb26-11e8-a70a-0af39e961018" : "Error attaching EBS volume \"vol-09e63def4d633b9d9\"" to instance "i-097cbbc3e163e4ca5" since volume is in "creating" state
2m54s Warning FailedMount Pod MountVolume.SetUp failed for volume "pvc-f0db059b-cb26-11e8-a70a-0af39e961018" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubele
You can’t perform that action at this time.