Skip to content

Instantly share code, notes, and snippets.

View varas's full-sized avatar
🦾

jhvaras varas

🦾
View GitHub Profile
@miguelmota
miguelmota / chromecast.sh
Last active September 6, 2021 07:35
Linux chromecast play video
go get -u github.com/vishen/go-chromecast
go-chromecast ls
go-chromecast load video.mp4
go-chromecast pause
go-chromecast unpause
go-chromecast volume 0.5
go-chromecast stop
go-chromecast ui
@sanketsudake
sanketsudake / kind-kubernetes-metrics-server.md
Last active April 5, 2024 07:06
Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.

@tirumaraiselvan
tirumaraiselvan / setupadmissionwebhook.md
Last active April 28, 2024 10:16
Setup admission webhooks in Kubernetes
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@gnugat
gnugat / StackRollback.php
Last active May 12, 2017 09:24
A Middleware preventing Doctrine DBAL to change the database, useful for tests
<?php
namespace Gnugat\StackRollback;
use Doctrine\DBAL\Connection;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* Example:
@sjl
sjl / ext.vim
Created December 15, 2014 18:58
ways to run external commands in vim
" run command
" no stdin
" output displayed in "Press enter to continue" style
" current buffer untouched
:!uptime
" run command
" pipe range of text to command on stdin
" output replaces the range in the current buffer
:RANGE!grep foo
@felixcarmona
felixcarmona / performWhen.js
Last active August 29, 2015 14:06
performWhen
define([], function () {
return function (task_closure, condition_closure, timeout_function) {
var itself = function () {
timeout_function(function () {
if (condition_closure()) {
task_closure();
} else {
itself();
}
}, 100);
@viktorklang
viktorklang / in-fino-veritas.zsh-theme
Last active July 31, 2023 01:47
In Fino Veritas ZSH theme
#!/usr/bin/env zsh
# in fino veritas
# Borrowing shamelessly from these oh-my-zsh themes:
# fino-time
# pure
# https://gist.github.com/smileart/3750104
# Set required options
@arunoda
arunoda / 1.docs.md
Last active March 18, 2016 21:18
Meteor Latency Compensation - The Correct Way

##Meteor Latency Compensation - The Correct Way

This is a kind of correction I wan't make regards to the concept describe in discover-meteor book

For the latency compensation to occur we cloud simply share the same method in the client/server. We can do this by simply putting the method under a place which can see by bot the server and client.

But practically(not all the time) we should not do that. In the server code we might have some logic which should not share. Or simply we might have some secret tokens.

So the correcy approach is define the method (in this case post) seperately in the two context. as shown below

@mkchandler
mkchandler / Setting up SourceGear DiffMerge for Git.md
Last active January 13, 2022 10:44
Setup guide for making Git recognize and use SourceGear DiffMerge.
  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
    

tool = DiffMerge