[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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @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})-(.+)\/$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'], |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* 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'), |
Last Updated: 8/30/18
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:
OlderNewer