Skip to content

Instantly share code, notes, and snippets.

View spatialy's full-sized avatar

Yulian Diaz spatialy

View GitHub Profile
@oskapt
oskapt / e08-handout.md
Created August 27, 2019 15:18
Scripts and commands for https://youtu.be/09bsaCkLfw4

Hello! This gist goes with this video, which covers shortcuts and strategies for working with the K8s command line. You can see all of my videos on YouTube at https://adrian.goins.tv.

Scripts

I use Fish as my shell, but I know that a lot of people are using Bash. Here are two ways to concatenate config files for kubectl into the KUBECONFIG environment variable. If you're using zsh or tcsh you'll know how to convert these to your shell's format.

You can call these from your shell init file, or if you want to temporarily disable a script, append .bak or .disabled to its extension and run the script manually.

You can even hotkey it on something like the Elgato Stream Deck.

@dasbairagya
dasbairagya / disable.js
Last active October 22, 2018 18:59
Script to disable the right click and inspect elemt of any browser :
$(document).keydown(function(e) {
return 123 == e.keyCode ? !1 : e.ctrlKey && e.shiftKey && 73 == e.keyCode ? !1 : void 0
}), document.addEventListener("contextmenu", function(e) {
e.preventDefault()
}), document.onkeydown = function(e) {
return !e.ctrlKey || 67 !== e.keyCode && 86 !== e.keyCode && 85 !== e.keyCode && 117 !== e.keyCode ? !0 : !1
}, $(document).keypress("u", function(e) {
return e.ctrlKey ? !1 : !0
});
@dasbairagya
dasbairagya / function.php
Created May 1, 2017 05:18
short code to get the woocommerce recently viewed products
//short code to get the woocommerce recently viewed products
<?php function custom_track_product_view() {
if ( ! is_singular( 'product' ) ) {
return;
}
global $post;
if ( empty( $_COOKIE['woocommerce_recently_viewed'] ) )
$viewed_products = array();
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active April 27, 2024 22:46
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@ethanpil
ethanpil / gist:4074756
Created November 14, 2012 20:56
Simple Code Obfuscator for PHP
<?php
/* Simple Code Obfuscator for PHP
* See: http://stackoverflow.com/questions/232736/code-obfuscator-for-php/3781356#3781356
*/
$infile=$_SERVER['argv'][1];
$outfile=$_SERVER['argv'][2];
if (!$infile || !$outfile) {