Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

modemlooper modemlooper

🏠
Working from home
View GitHub Profile
View ionic view boilerplate
<ion-header>
<ion-toolbar color="clear">
<ion-buttons slot="start">
</ion-buttons>
<ion-title></ion-title>
<ion-buttons slot="end">
</ion-buttons>
</ion-toolbar>
</ion-header>
@modemlooper
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 ^ http://domain.com$request_uri?
permanent;
access_log off;
}
@modemlooper
modemlooper / bp-group-create-admin.php
Last active Aug 18, 2020
Admin page to create BuddyPress groups
View bp-group-create-admin.php
<?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
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/(.*)$ https://url.com/wp-content/uploads/$1 permanent;
}
View gist:203c31717387cd0a3817fb151630a7b7
*******HOMEPAGE
import { Component, h } from '@stencil/core';
@Component({
tag: 'app-home',
styleUrl: 'app-home.css'
})
export class AppHome {
View gist:4dcae392e10e3c7a9032fadc8ce706a8
<ion-item>
<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>
</ion-select>
</ion-item>
<ion-list-header>
<ion-label>
@modemlooper
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
modemlooper / sign.php
Created Oct 2, 2019 — forked from wouterdewinter/sign.php
Tutorial: Securing private content on AWS Cloudfront
View sign.php
<?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) {
console.log(req);
if (req.url === '/') {
@modemlooper
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