Skip to content

Instantly share code, notes, and snippets.

Mandi Wise mandiwise

Block or report user

Report or block mandiwise

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mandiwise /
Last active Jan 31, 2020
Create dummy certificates to start up nginx so it can request real certificate from Let's Encrypt
# Usage:
# $ chmod +x
# $ 1
# Reference:
mandiwise / seedData.js
Last active Feb 28, 2020
Generate seed data for Auth0 and MongoDB.
View seedData.js
// Usage (from `server` directory):
// $ node -r dotenv/config -r esm src/scripts/seedData.js <PASSWORD>
import faker from "faker";
import gravatarUrl from "gravatar-url";
import mongoose from "mongoose";
import auth0 from "../config/auth0";
import initMongoose from "../config/mongoose";
import Post from "../models/Post";
mandiwise / permutations.js
Last active Oct 29, 2019
Get all unique permutations of character strings in an array.
View permutations.js
let someChars = ['A', 'B', 'C', 'D'];
* Handle all permutations for one array item (in relation to all other array items)
function permutateAgainstOneItem(arr) {
let [first, ...tail] = arr;
let head = [first];
let permutations = [];
mandiwise / data.js
Last active Apr 17, 2019
Some sample movie data
View data.js
const data = {
people: [
id: 1,
name: "Mark Hamill",
birthday: "September 25, 1951",
placeOfBirth: "Oakland, California, USA",
"Mark Hamill is best known for his portrayal of Luke Skywalker in the original Star Wars trilogy.",
filmography: [1]
mandiwise / dataFormatHelpers.js
Last active May 22, 2018
Function to help format data fetched from the R10 Graphcool API for a React Native SectionList.
View dataFormatHelpers.js
// Helper to format GraphQL data into section list data
export const formatSessionData = sessions => {
return sessions
.reduce((acc, curr) => {
const timeExists = acc.find(section => section.title === curr.startTime);
: acc.push({ title: curr.startTime, data: [curr] });
return acc;
}, [])
mandiwise / styles.css
Created Jan 31, 2017
CSS for meteor-react-todo app AccountsUiWrapper component
View styles.css
/* Account Login */
.app-wrapper {
align-items: center;
display: flex;
justify-content: center;
height: 100vh;
mandiwise / App.css
Created Sep 7, 2016
CSS for react-todo app
View App.css
/* To-Do List */
#root {
display: flex;
justify-content: center;
height: 100vh;
.todo-list {
mandiwise / dploy.yaml
Last active Oct 12, 2017
Community Project DPLOY config file
View dploy.yaml
scheme: sftp
port: 22
check: true
"themes/[YOUR-THEME-NAME]/build/**": "themes/[YOUR-THEME-NAME]/build/"
exclude: [ "", ".gitignore", "themes/[YOUR-THEME-NAME]/.eslintrc", "themes/[YOUR-THEME-NAME]/gulpfile.js", "themes/[YOUR-THEME-NAME]/package.json", "themes/[YOUR-THEME-NAME]/package-lock.json", "themes/[YOUR-THEME-NAME]/js/**", "themes/[YOUR-THEME-NAME]/sass/**" ]
mandiwise / .gitignore
Last active Dec 4, 2017
Communit Project .gitignore
View .gitignore
# Ignore OS files #
# =============== #
mandiwise / sql.txt
Last active May 29, 2016
Renaming WP Database Table Preifx
View sql.txt
RENAME table `wp_commentmeta` TO `NEWPREFIX_commentmeta`;
RENAME table `wp_comments` TO `NEWPREFIX_comments`;
RENAME table `wp_links` TO `NEWPREFIX_links`;
RENAME table `wp_options` TO `NEWPREFIX_options`;
RENAME table `wp_postmeta` TO `NEWPREFIX_postmeta`;
RENAME table `wp_posts` TO `NEWPREFIX_posts`;
RENAME table `wp_terms` TO `NEWPREFIX_terms`;
RENAME table `wp_termmeta` TO `NEWPREFIX_termmeta`;
RENAME table `wp_term_relationships` TO `NEWPREFIX_term_relationships`;
RENAME table `wp_term_taxonomy` TO `NEWPREFIX_term_taxonomy`;
You can’t perform that action at this time.