Skip to content

Instantly share code, notes, and snippets.

View mhackersu's full-sized avatar
🐧
tokimeku

Mike Hacker mhackersu

🐧
tokimeku
View GitHub Profile
@mhackersu
mhackersu / install-k8s-arch.md
Created September 6, 2022 02:53 — forked from keqiang/install-k8s-arch.md
Install Kubernetes on Bare-metal Arch Linux Using kubeadm

Install Kubernetes on Bare-metal Arch Linux Using kubeadm

You can use root to perform following steps until a regular user is indicated

Install Packages that K8s(actually kubeadm) requires

If one of these packages are not presented, kubeadm will report warnings or errors

pacman -S docker ebtables ethtool socat
@mhackersu
mhackersu / arch_linux_installation.md
Created April 20, 2022 15:30 — forked from OdinsPlasmaRifle/arch_linux_installation.md
LVM on LUKS Arch installation with systemd-boot
@mhackersu
mhackersu / fetch-dev-secrets-from-vault.sh
Created August 11, 2021 17:50 — forked from shtratos/fetch-dev-secrets-from-vault.sh
Bash script to fetch and store secrets from Azure KeyVault
#!/usr/bin/env bash
#
# Fetch secrets for local development from Azure KeyVault
# and print them to stdout as a bunch of env var exports.
# These secrets should be added to your local .env file
# to enable running integration tests locally.
#
KEY_VAULT=$1
function fetch_secret_from_keyvault() {
@mhackersu
mhackersu / gist:919232e99aaec26afdeba08053ed0f6b
Created November 26, 2018 22:34 — forked from MindyPostoff/gist:00f623326db4daa50394
Custom URL for the Continue Shopping button in WooCommerce Cart
/**
* Redirect the Continue Shopping URL from the default (most recent product) to
* a custom URL.
* Place this code snippet in your theme's functions.php file.
*/
function custom_continue_shopping_redirect_url ( $url ) {
$url = "http://www.woothemes.com"; // Add your link here
return $url;
}
add_filter('woocommerce_continue_shopping_redirect', 'custom_continue_shopping_redirect_url');
@mhackersu
mhackersu / functions.php
Created November 26, 2018 20:50 — forked from shivapoudel/functions.php
WooCommerce - Allow rendering of checkout and account pages in iframes
<?php // Do not include this if already open!
/**
* Code goes in theme functions.php.
*/
add_action( 'after_setup_theme', 'wc_remove_frame_options_header', 11 );
/**
* Allow rendering of checkout and account pages in iframes.
*/
@mhackersu
mhackersu / shapefileConversion.md
Created November 1, 2017 22:40 — forked from YKCzoli/shapefileConversion.md
Step through of converting shapefile to geojson with qgis.

Converting shapefiles to geojson

####Assumptions

Get the data

We will use the Electoral District and Polling Division shapefiles found on the Elections Ontario site:

@mhackersu
mhackersu / Dokku.sh
Created September 27, 2017 04:08 — forked from didierfranc/Dokku.sh
Get Dokku working with Ubuntu 16.04 LTS
sudo sh -c "
wget -nv -O - https://packagecloud.io/gpg.key | apt-key add -
echo 'deb https://packagecloud.io/dokku/dokku/ubuntu/ trusty main' | tee /etc/apt/sources.list.d/dokku.list
apt-get update -qq > /dev/null
apt-get install sigil -t trusty # We're using the Ubuntu 14.04 package ;)
apt-mark hold sigil
wget https://raw.githubusercontent.com/dokku/dokku/master/bootstrap.sh
bash bootstrap.sh
"
@mhackersu
mhackersu / SassMeister-input-HTML.html
Created April 28, 2016 04:58 — forked from mirisuzanne/SassMeister-input-HTML.html
Susy One Tutorial: Mobile-First Magic Grids [part 2]
<div class="page">
<header class="banner">
<p>Banner</p>
</header>
<nav class="pagenav">
<p><a href="#">Page Nav</a></p>
</nav>
<main class="main">
<aside class="summary">
<p>Summary</p>
@mhackersu
mhackersu / active-record-migration-expert.md
Last active August 29, 2015 14:26 — forked from pyk/active-record-migration-expert.md
become active record migration expert (Rails 4.0.2)

become active record migration expert (Rails 4.0.2)

workflow:

create model

$ rails g model NameOfModel
    invoke  active_record
    create    db/migrate/YYYYMMDDHHMMSS_create_name_of_models.rb
# Call scopes directly from your URL params:
#
# @products = Product.filter(params.slice(:status, :location, :starts_with))
module Filterable
extend ActiveSupport::Concern
module ClassMethods
# Call the class methods with the same name as the keys in <tt>filtering_params</tt>
# with their associated values. Most useful for calling named scopes from