Skip to content

Instantly share code, notes, and snippets.

View mnhpub's full-sized avatar
🐧
tokimeku

M Hacker mnhpub

🐧
tokimeku
View GitHub Profile
@mnhpub
mnhpub / arch-webserver.md
Created February 19, 2025 22:37 — forked from janoliver/tutorial.md
Arch Linux as a Web Server

In this tutorial, I briefly explain how to set up a webserver using nginx, openssl and uwsgi on Arch Linux. The tutorial is applicable to other Linux distributions and goes through the required configuration step by step. It is, I believe, beginner friendly.

0. Version

I updated, changed and tested the tutorial on Dec. 8th, 2013. All commands and configuration files relate to the software versions that are currently available in the Arch package repositories. Especially nginx and uwsgi change often and

@mnhpub
mnhpub / 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
@mnhpub
mnhpub / 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
@mnhpub
mnhpub / 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() {
@mnhpub
mnhpub / 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');
@mnhpub
mnhpub / 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.
*/
@mnhpub
mnhpub / 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:

@mnhpub
mnhpub / 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
"
@mnhpub
mnhpub / 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>
@mnhpub
mnhpub / 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