Skip to content

Instantly share code, notes, and snippets.

Working from home

modemlooper modemlooper

Working from home
View GitHub Profile
View ionic view boilerplate
<ion-toolbar color="clear">
<ion-buttons slot="start">
<ion-buttons slot="end">
modemlooper / gist:39cdc585b146894a407cb32a830eed7d
Created Nov 27, 2020
use WordPress production media on local nginx
View gist:39cdc585b146894a407cb32a830eed7d
location ~ ^(/wp-content/themes|/wp-content/uploads)/.*\.(jpe?g|gif|css|png|js|ico|pdf|m4a|mov|mp3)$ {
rewrite ^$request_uri?
access_log off;
modemlooper / bp-group-create-admin.php
Last active Aug 18, 2020
Admin page to create BuddyPress groups
View bp-group-create-admin.php
* BuddyPress Groups create admin screen.
* Props to WordPress core for the Comments admin screen, and its contextual
* help text, on which this implementation is heavily based.
* @package BuddyPress
* @subpackage Groups
modemlooper / gist:711e435aaa4661de7677696b5b0a1630
Created Jul 24, 2020
flywheel local use production media
View gist:711e435aaa4661de7677696b5b0a1630
# Load media in /uploads/ from remote site.
location ~ ^/wp-content/uploads/(.*) {
rewrite ^/wp-content/uploads/(.*)$$1 permanent;
View gist:203c31717387cd0a3817fb151630a7b7
import { Component, h } from '@stencil/core';
tag: 'app-home',
styleUrl: 'app-home.css'
export class AppHome {
View gist:4dcae392e10e3c7a9032fadc8ce706a8
<ion-label>Sort Method</ion-label>
<ion-select value="recent">
<ion-select-option value="recent">Most Recent</ion-select-option>
<ion-select-option value="location">Location</ion-select-option>
modemlooper / htaccess
Created Jan 21, 2020
runcloud redirect htaccess
View htaccess
RewriteEngine On
# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
# Redirect to https version
modemlooper / sign.php
Created Oct 2, 2019 — forked from wouterdewinter/sign.php
Tutorial: Securing private content on AWS Cloudfront
View sign.php
* Sign a private asset url on cloudfront
* @param $resource full url of the resources
* @param $timeout timeout in seconds
* @return string signed url
* @throws Exception
View proxy.js
var fs = require('fs');
var httpProxy = require('http-proxy');
var http = require('http');
var https = require('https');
var express = require('express');
var app = express();
app.use(function (req, res, next) {
if (req.url === '/') {
modemlooper / .gitignore
Created May 14, 2019
gitignore wp-content
View .gitignore
# -----------------------------------------------------------------
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
# To ignore uncommitted changes in a file that is already tracked, use
# git update-index --assume-unchanged
# To stop tracking a file that is currently tracked, use
# git rm --cached