Skip to content

Instantly share code, notes, and snippets.

View asrail's full-sized avatar

Caio Tiago Oliveira asrail

  • Salvador, Bahia, Brasil
View GitHub Profile
apiVersion: v1
stringData:
AWS_ACCESS_KEY_ID: put your access key ID here
AWS_SECRET_ACCESS_KEY: put your secret access key here. You can use any "safe" form for secret management
kind: Secret
metadata:
name: aws-creds
type: Opaque
---
apiVersion: v1
@asrail
asrail / README.md
Created December 7, 2018 18:18 — forked from adambom/README.md
Backup Kubernetes Cluster State

Run this in order to backup all you k8s cluster data. It will be saved in a folder bkp. To restore the cluster, you can run kubectl apply -f bkp.

Please note: this recovers all resources correctly, including dynamically generated PV's. However, it will not recover ELB endpoints. You will need to update any DNS entries manually, and manually remove the old ELB's.

Please note: This has not been tested with all resource types. Supported resource types include:

  • services
  • replicationcontrollers
  • secrets
  • deployments
  • horizontal pod autoscalers
@asrail
asrail / emacs.txt
Created December 4, 2013 16:23
Guia rápido do Emacs
*Auxiliar do Emacs
M representa <Alt> pressionado ou pressionar e liberar <Esc>
C representa <Control> pressionado
S representa <Shift> pressionado, aparecendo apenas quando necessário para evitar ambiguidade
Um hífen entre sequências significa que todos devem estar ativos ao mesmo tempo
Sequências separadas por espaço denotam execução sucessiva
Comandos básicos:
C-x C-f - (find-file) abrir
@asrail
asrail / dslr.txt
Created November 24, 2012 17:48
List of resources about semi-professional DSLR cameras
http://www.cameralabs.com/videos/Latest_Camera_and_Lens_video_reviews.shtml
http://www.mir.com.my/rb/photography/companies/nikon/nikkoresources/AFNikkor/AF28105mm/index.htm
http://snapsort.com/cameras/Nikon-D5100
http://www.nikon.com.br/Nikon-Products/Product/Camera-Lenses/2168/PC-E-NIKKOR-24mm-f%252F3.5D-ED.html#!
Compare to: D90, D600
@asrail
asrail / old-inf-ruby.el
Created October 19, 2012 00:55
Old inf-ruby, for comparison
;;; -*-Emacs-Lisp-*-
;;;
;;; $Id: inf-ruby.el 25189 2009-10-02 12:04:37Z akr $
;;; $Author: akr $
;;;
;;; Inferior Ruby Mode - ruby process in a buffer.
;;; adapted from cmuscheme.el
;;;
;;; Usage:
;;;
IF(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
FIND_PACKAGE(KDE4 REQUIRED)
INCLUDE(KDE4Defaults)
ADD_DEFINITIONS(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
ENDIF(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
@asrail
asrail / .gitconfig
Created November 18, 2010 17:38
git config
[user]
name = ...
email = ...
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@asrail
asrail / iterator.c
Created November 4, 2010 02:02
C list iterator
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
typedef int T;
typedef struct lista tlista;
typedef struct iterator titerator;
tlista *novo_lista(void);
@asrail
asrail / diff.js
Created September 17, 2010 00:16
js diff for strings
/*
Name: wDiff.js
Version: 0.9.8 (March 20, 2010)
Info: http://en.wikipedia.org/wiki/User:Cacycle/diff
Code: http://en.wikipedia.org/wiki/User:Cacycle/diff.js
JavaScript diff algorithm by [[en:User:Cacycle]] (http://en.wikipedia.org/wiki/User_talk:Cacycle).
Outputs html/css-formatted new text with highlighted deletions, inserts, and block moves.
For newline highlighting the following style rules have to be added to the document:
[Job]
[Mozilla/5.0 (X11; Linux x86_64; rv:2.0b6pre) Gecko/20100910 Firefox/4.0b6pre SeaMonkey/2.1b1pre]
http://krakenbenchmark.mozilla.com/kraken-1.0/results.html?%7B%22v%22:%20%22kraken-1.0%22,%20%22ai-astar%22:%5B1074,1089,1064,1067,1115,1056,1120,1042,1060,1036%5D,%22audio-beat-detection%22:%5B1029,996,1027,1015,1000,1004,1012,1007,993,1042%5D,%22audio-dft%22:%5B752,748,807,864,798,792,811,790,766,793%5D,%22audio-fft%22:%5B909,911,944,906,915,904,902,918,913,919%5D,%22audio-oscillator%22:%5B838,907,879,925,885,885,857,866,821,871%5D,%22imaging-gaussian-blur%22:%5B1063,1063,1092,1085,1188,1049,1096,1174,1053,1053%5D,%22imaging-darkroom%22:%5B458,463,457,457,460,462,461,460,466,461%5D,%22imaging-desaturate%22:%5B1092,1089,1106,1106,1107,1084,1083,1104,1105,1138%5D,%22json-parse-financial%22:%5B227,286,276,245,260,253,223,246,230,248%5D,%22json-stringify-tinderbox%22:%5B122,105,153,140,137,152,121,127,136,126%5D,%22stanford-crypto-aes%22:%5B346,334,369,311,362,318,311,317,345,330%5D,%22stanford-crypto-ccm%22: