Skip to content

Instantly share code, notes, and snippets.

View baskeboler's full-sized avatar
🏠
Working from home

Victor Gil baskeboler

🏠
Working from home
View GitHub Profile
@baskeboler
baskeboler / kubectl.fish
Created May 7, 2019 21:49 — forked from terlar/kubectl.fish
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end
@baskeboler
baskeboler / observa.js
Created February 5, 2019 05:34
bookmarklet para saltear el bloqueo por suscripción en elobservador.com.uy
javascript: (function() { function viewObserva(document) { let paywall = document.getElementsByClassName("mensaje_paywall"); for (let i = 0; i < paywall.length; i++) { paywall.item(i).remove(); } paywall = document.getElementsByClassName("mensaje_paywall2"); for (let i = 0; i < paywall.length; i++) { paywall.item(i).remove(); } let nota = document.getElementsByClassName("cuerpo"); for (let i = 0; i < nota.length; i++) { nota.item(i).classList.remove("fade"); } console.log("chupame la pija observador!") } viewObserva(document); })();
@baskeboler
baskeboler / config
Created July 9, 2018 17:17
i3 configuration
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
Promise.resolve(1)
.then((x) => x + 1)
.then((x) => { throw new Error('My Error') })
.catch(() => 1)
.then((x) => x + 1)
.then((x) => console.log(x))
.catch(console.error)
@baskeboler
baskeboler / first.md
Last active February 15, 2018 20:12
trying gist.io

some header

some text some text some text some text some text

some other header

@baskeboler
baskeboler / trying blocks
Created February 15, 2018 20:05
gist description
# testing this
some text
## some other header
some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text some more text
@baskeboler
baskeboler / git_fzf_key_bindings.fish
Created February 13, 2018 21:43 — forked from aluxian/git_fzf_key_bindings.fish
Key bindings for git+fzf ported to Fish shell https://junegunn.kr/2016/07/fzf-git/
function __git_fzf_is_in_git_repo
command -s -q git
and git rev-parse HEAD >/dev/null 2>&1
end
function __git_fzf_git_status
__git_fzf_is_in_git_repo; or return
git -c color.status=always status --short | \
fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \
cut -c4- | \
@baskeboler
baskeboler / mac-os-sierra-virtualbox.md
Last active July 21, 2017 02:03
install mac os sierra virtual machine
$ vagrant init jhcook/macos-sierra
$ vagrant up

(I got errors while starting the virtual machine, fixed it opening Virtualbox and editing the generated virtual machine's settings. I disabled nested pagination from the System -> Acceleration menu)

After that the vm booted without problems and I was able to successfully install xcode.

@baskeboler
baskeboler / isIPhone6PlusOrHigher.js
Last active December 27, 2016 05:29
checking if we are on iphone 6 plus or higher with cordova device.model
var modelString = device.model;
var modelRegex = /\d+/g;
var isIPhone6PlusOrHigher = false;
var match = modelString.match(modelRegex);
if (match != null) {
var major = match[0], minor = match[1];
if (major == 7) {
if (minor != 2) {
// iphone 6 plus
isIPhone6PlusOrHigher = true;
@baskeboler
baskeboler / inheritance.js
Last active August 29, 2015 14:22
Javascript inheritance and polymorphism
var Person = function (name) {
this.name = name;
}
Person.prototype = {
sayHi: function() {
console.log('Hi, my name is ' + this.name);
},
parentClassMethod: function() {
console.log('Method from Person class called on ' + this.name);