Skip to content

Instantly share code, notes, and snippets.

@sibelius
sibelius / authenticatedMidldeware.tsx
Created February 15, 2019 12:16
Auth middleware to use with RR4
import * as React from 'react';
import { withRouter } from 'react-router-dom';
import { isLoggedIn } from '../../security/authentication';
import routeTo from '../utils/routeTo';
const authenticatedMiddleware = Component => {
class AuthenticatedMiddleware extends React.PureComponent {
componentDidMount() {
this.redirectIfNotAuthenticated();
@mabasic
mabasic / helpers.php
Last active April 27, 2024 14:07
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@illycz
illycz / gist:4bdc53197ff7f54cf6e5
Created July 1, 2014 11:49
Performance Wordpress Checklist
0. RESOURCES
http://www.smashingmagazine.com/2014/06/25/how-to-speed-up-your-wordpress-website/
1. IDENTIFY PLUGINS THAT ARE SLOWING YOU DOWN
https://wordpress.org/plugins/p3-profiler/
2. COMPRESS YOUR WEBSITE
http://checkgzipcompression.com/
https://gist.github.com/illycz/1b896273dfd4cf26d184
@zdwolfe
zdwolfe / gist:6721115
Last active October 1, 2018 06:38
Basic nginx configuration for AngularJS html5Mode
server {
listen 0.0.0.0:12345;
location / {
root /home/zdwolfe/src/angularAWS/app;
try_files $uri $uri/ /index.html =404;
}
}
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 23:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",