Skip to content

Instantly share code, notes, and snippets.

View jonleopard's full-sized avatar
ಠ_ಠ

Jon Leopard jonleopard

ಠ_ಠ
View GitHub Profile
@danivovich
danivovich / nginx-ghost.conf
Created June 24, 2016 13:18
Basic nginx configuration for a caching proxy for ghost blogging, designed for use in Docker
server {
listen 80 default_server;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location ~* \.(jpg|jpeg|svg|png|gif|ico|css|js|eot|woff)$ {
proxy_cache GHOST;
@Granitosaurus
Granitosaurus / steam_game_linkinator
Last active September 29, 2017 22:26
converts a list of games into linked items with reviews.
import requests
from parsel import Selector
def scrape():
data = """
7 Grand Steps: What Ancients Begat (DRM Free + Steam)
2064: Read Only Memories (DRM Free + Steam)
A Virues Named TOM (DRM Free + Steam)
AI War: Fleet Command (DRM Free + Steam)
@resir014
resir014 / gatsby-node.js
Last active June 7, 2018 18:58
Simulate Jekyll's page generation on Gatsby!
// @ts-check
// Requires module: slug, gatsby-source-filesystem
const path = require('path')
const slugify = require('slug')
const { createFilePath } = require('gatsby-source-filesystem')
// Regex to parse date and title from the filename
const BLOG_POST_SLUG_REGEX = /^\/blog\/([\d]{4})-([\d]{2})-([\d]{2})-(.+)\/$/
@markerikson
markerikson / http-data-fetching.md
Last active September 13, 2018 15:06
HTTP data fetching steps and terms

[11:45 PM] someuser : how can I pull data from mysql database using react js?
[11:46 PM] BTM : @someuser short answer - "you can't"
[11:46 PM] connor : have react hit a proxied api that makes request using mysql
[11:46 PM] connor : using fetch or axios
[11:46 PM] someuser : the package has apollo in it
[11:46 PM] BTM : You need an API that will expose the data from sql as REST, graphql etc.
[11:46 PM] someuser : whats the apollo for?
[11:46 PM] someuser : im confused between graphql, apollo and redux.
[11:46 PM] acemarke : okay, let me explain
[11:47 PM] acemarke : first: no matter what UI framework you're using, here's the basic data flow

@nikgraf
nikgraf / .eslintrc.js
Last active July 12, 2019 19:11
Prettier / Eslint Setup
module.exports = {
root: true, // make to not take in any user specified rules in parent folders
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'prettier/flowtype', 'prettier/react'],
env: {
browser: true,
node: true,
jest: true,
},
plugins: ['flowtype'],
@DirtyF
DirtyF / README.md
Last active April 11, 2021 17:24
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/macos/

First, make sure you have command line tools installed:

xcode-select --install

Then open Terminal.app and type:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/fbc736fa1b50bd637929a315e6803df306c8bc8e/setup-rbenv.sh | bash
@tlrobinson
tlrobinson / prettier-branch.sh
Last active December 13, 2021 00:00
Steps for merging an old branch into a newly prettier-ified codebase. Use at your own risk, verify everything was correctly merged.
# Assumes 3 sequential commits:
#
# 1. commit tagged "prettier-before" that added `prettier` depedency and `prettier` script your package.json
# 2. commit that actually ran `prettier` on your entire codebase for the first time
# 3. commit tagged "prettier-after" that fixes any minor issues caused by prettier (e.x. moving eslint-ignore or $FlowFixMe comments around), or just the next commit if there were none
#
# I recommend running these as individual commands, not as a script, in case of merge conflicts
#
# Checkout the non-pretty branch you want to merge
# (or optionally make a new branch with `git checkout -b $YOUR_BRANCH-prettier $YOUR_BRANCH`)
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),
@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
@jcconnell
jcconnell / USG_OpenVPN_Radius_Auth.md
Last active August 28, 2023 09:04
Unifi Security Gateway (USG) OpenVPN server with RADIUS authentication

Last Updated: 8/30/18

Details

I wanted to run an OpenVPN server on the USG. Since it has a Radius server built in, I figured this would be a much better way to handle OpenVPN authentication. Make sure you have the Radius server enabled on your USG under Settings > Services > Radius > Server in the controller. Add OpenVpn users under Settings > Services > Radius > Server.

Thanks to the following resources in helping to configure this: