Skip to content

Instantly share code, notes, and snippets.

View darkslategrey's full-sized avatar

Grégory Faruch darkslategrey

View GitHub Profile
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@darkslategrey
darkslategrey / copy_image_to_cluster.sh
Created July 29, 2019 21:56 — forked from muvaf/copy_image_to_cluster.sh
Copy images from your local host to minikube cluster
# This is an excerpt from https://github.com/crossplaneio/crossplane/blob/master/cluster/local/minikube.sh
# I think it's pretty useful on its own.
#!/usr/bin/env bash
set -eE
function copy_image_to_cluster() {
local build_image=$1
local final_image=$2
docker save "${build_image}" | (eval "$(minikube docker-env --shell bash)" && docker load && docker tag "${build_image}" "${final_image}")
@darkslategrey
darkslategrey / ParameterizeHashicorpNomadJob.md
Created May 30, 2019 16:33 — forked from rohitkothari/ParameterizeHashicorpNomadJob.md
How to parameterize a Hashicorp's Nomad Job for user-defined variables?

How to parameterize a Hashicorp's Nomad Job for user-defined variables?

Description

This sample Nomad job attempts to clone a github repository from a github account, and then perform ls command to verify if it downloaded.

However, the cool thing is, it uses parameterized construct to parameterize the repository name so I can re-use this nomad job to clone any repository at runtime.

Motivation for writing

O portatil precisa de pci=noaer e acpi_osi= nas boot options

Installing Arch Linux

Get the Wiki ready!

Installing the base system

@darkslategrey
darkslategrey / destructuring.md
Created January 9, 2019 07:51 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@darkslategrey
darkslategrey / gc
Created July 13, 2018 08:47 — forked from scjody/gc
"gcloud config" wrapper to easily select the correct configuration
#!/bin/bash
if [[ -z "$1" ]]; then
gcloud config configurations list;
else
case "$1" in
# These clauses implement aliases for my most commonly used configurations.
# Change them to support your needs or remove them.
prod)
gcloud config configurations activate default
@darkslategrey
darkslategrey / tramp-gcloud-ssh
Created July 13, 2018 08:46 — forked from scjody/tramp-gcloud-ssh
EMACS TRAMP setup for "gcloud compute ssh"
;; TRAMP gcloud ssh
(add-to-list 'tramp-methods
'("gssh"
(tramp-login-program "gssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-args ("-c"))
(tramp-gw-args (("-o" "GlobalKnownHostsFile=/dev/null")
("-o" "UserKnownHostsFile=/dev/null")
@darkslategrey
darkslategrey / docker.md
Created May 21, 2018 19:13 — forked from f3l1x/aliases
Docker - installation, tips, commands, aliases

Docker

Shortcuts

$ curl -fsSL https://raw.github.com/tcnksm/docker-alias/master/zshrc >> ~/.bashrc && source ~/.bashrc
# ------------------------------------