Skip to content

Instantly share code, notes, and snippets.

Converting Coffee to Code, Daily

Duane Leem duaneleem

Converting Coffee to Code, Daily
View GitHub Profile
duaneleem /
Last active Nov 10, 2021 — forked from muralisc/
Install tmux 3.0a on Amazon Linux 2 / rhel /centos
# Install tmux 3.0a on Amazon Linux 2
# Originally tailored for CentOS 7
# install deps
sudo yum install -y gcc kernel-devel make ncurses-devel
## Needs openssl
sudo yum install openssl-devel
## Install
View tm-creatingcommunicators.html
<iframe src="" width="700px" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowfullscreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"></iframe>
duaneleem /
Created Sep 30, 2019
Remove K8s on Ubuntu 16
kubeadm reset
sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*
sudo apt-get autoremove
sudo rm -rf ~/.kube
duaneleem / clickfunnels.html
Created Aug 17, 2019
ClickFunnels Province / Country / State
View clickfunnels.html
<script type="text/html" id="cfx_all_canada">
<option value="">Select Province</option>
<option value="">------------------------------</option>
<option value="AB">Alberta</option>
<option value="BC">British Columbia</option>
<option value="MB">Manitoba</option>
<option value="NB">New Brunswick</option>
<option value="NL">Newfoundland and Labrador</option>
<option value="NS">Nova Scotia</option>
<option value="ON">Ontario</option>
duaneleem / .htaccess
Last active Nov 12, 2018
Immutable WordPress Example. Visit the following for further information:
View .htaccess
# ================================================================================
# Redirects uploads to production.
# ================================================================================
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^wp-content/uploads/(.*)$$1 [R=301,NC,L]
# ================================================================================
duaneleem / HashRouter.js
Last active Sep 11, 2018
Example of our HashRouter is used in React. Great for static hosting services such as GitHub Pages.
View HashRouter.js
<Route path="/" component={Home} />
<Route path="about" component={About} />
<Route path="teachers" component={Teachers} />
<Route path="courses" component={Courses} />
duaneleem / page-private.php
Created Apr 11, 2018
WordPress private page.
View page-private.php
* This template is used for displaying PRIVATE pages.
* Template Name: Private: Full Width
get_header(); ?>
<div class="wrapper section medium-padding">
duaneleem / add-year.js
Created Mar 30, 2018
Adds a year to the current year.
View add-year.js
* @param {string} currentDate - The current date.
* @returns {string} Returns the new expiration date.
private addYear = (currentDate: string): string => {
// Add a day to the current date.
let objDate = new Date(currentDate);
objDate.setDate(objDate.getDate() + 1);
// Format the month.
duaneleem / example.diray.20180307.js
Last active Mar 7, 2018
Example output for Diray 20180213
View example.diray.20180307.js
var rm_trans = {
affiliateConfig: {ranMID: '42785', discountType: 'item'},
orderid: '2072',
currency: 'USD',
customerStatus: 'CUSTOMER_STATUS',
conversionType: 'Sale',
customerID: '0',
discountCode: 'upfree2, test2, test3',
discountAmount: 39.28,
taxAmount: 0,
duaneleem / .conf
Last active Feb 11, 2018
WordPress Assets Loaded from Production
View .conf
# Send all uploads links to production.
location ^~ /wp-content/uploads {
rewrite ^/wp-content/uploads/(.*)$$1 permanent;