Skip to content

Instantly share code, notes, and snippets.

View Pablo-Merino's full-sized avatar
🪛

Pablo Merino Pablo-Merino

🪛
View GitHub Profile
@Pablo-Merino
Pablo-Merino / dashboard.json
Created May 6, 2020 08:33
k8s-grafana-monitoring-dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-deployment
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: hello-deployment
@Pablo-Merino
Pablo-Merino / boxstarter.ps1
Last active March 21, 2020 20:29 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
### Keybase proof
I hereby claim:
* I am pablo-merino on github.
* I am pablo (https://keybase.io/pablo) on keybase.
* I have a public key ASA-nyknW3oIa-dY748tRkTJxd_tEYPHpCSoPcFiSIbOuAo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am Pablo-Merino on github.
  • I am pablo (https://keybase.io/pablo) on keybase.
  • I have a public key whose fingerprint is E8D6 3414 62DE 6F74 BA31 D1E1 5F3F 9E86 9E07 6C4A

To claim this, I am signing this object:

@Pablo-Merino
Pablo-Merino / ember.radio-buttons.js
Last active August 29, 2015 14:25
Ember Radio Button implementation with checked value and action
import Ember from 'ember';
export default Ember.Component.extend({
/**
* Specifies the HTML tag the component will render
*
* @property tagName
* @type string
*/
tagName: "input",
@Pablo-Merino
Pablo-Merino / mini.template.engine.js
Last active August 29, 2015 14:17
MiniTemplateEngine
function MiniTemplateEngine(base, replaceables) {
Object.keys(replaceables).forEach(function (key) {
var value = replaceables[key];
base = base.replace(new RegExp('{{' + key+ '}}', 'gi'), value);
});
return base;
}
@Pablo-Merino
Pablo-Merino / rand.rb
Last active August 29, 2015 14:10
Random extended ASCII String
def str(i)
(0...i).map { ((1..255).to_a.map { |i| i.chr(Encoding::UTF_8) unless i == " " }).sample }.join
end
@Pablo-Merino
Pablo-Merino / pdf_compressor.rb
Last active August 29, 2015 14:10
Some scripts I wrote to help me in cutting and compressing a bunch of PDFs
require 'ruby-progressbar'
files = (1..10).to_a
dir = "./" # DIRECTORY WHERE THE PDFS ARE KEPT (the PDFs have to be named pdf-#.pdf)
progressbar = ProgressBar.create(:format => '%a %bᗧ%i %p%% %t', :progress_mark => ' ', :remainder_mark => '・', :starting_at => 0, :total => 21)
files.each do |i|
`pdf2ps pdf-#{i}.pdf pdf-#{i}.ps`
progressbar.increment
`ps2pdf pdf-#{i}.ps pdf-compressed-#{i}.pdf`
class Summarizer
def initialize(text)
@text = text
end
def summarize
summary = []