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 { makeExecutableSchema } from 'graphql-tools'; | |
const typeDefs = ` | |
type Author { | |
id: Int | |
firstName: String | |
lastName: String | |
posts: [Post] | |
} | |
type Post { |
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 express from 'express'; | |
import bodyParser from 'body-parser'; | |
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express'; | |
import schema from './schema.js' | |
const PORT = 3000; | |
const app = express(); | |
console.log('calling app.js'); | |
// bodyParser is needed just for POST. |
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
{ | |
"name": "StrapNativeStarter-Pro", | |
"version": "7.0.0", | |
"private": true, | |
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js", | |
"scripts": { | |
"postinstall": "remotedev-debugger", | |
"start": "react-native-scripts start", | |
"eject": "react-native-scripts eject", | |
"android": "react-native-scripts android", |
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
var allsongs = [] | |
var outText = ""; | |
var songsToText = function(style, csv, likedonly){ | |
if (style === undefined){ | |
console.log("style is undefined."); | |
return; | |
} | |
var csv = csv || false; // defaults to false | |
var likedonly = likedonly || false; // defaults to false | |
if (likedonly) { |
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
<?php | |
$all_users = get_users(); | |
foreach( $all_users as $user ) { | |
$women = get_user_meta($user->ID, 'women_golfing'); | |
$men = get_user_meta($user->ID, 'men_golfing'); | |
if ($men[0] == 'True' || $women[0] == 'True') { | |
add_user_meta($user->ID, 'course_updates', "True"); | |
WP_CLI::success( "user: " . $user->ID . ", men/women: " . $men[0] . " / " . $women[0]); | |
} else { | |
WP_CLI::warning( "user: " . $user->ID . ", men/women: " . $men[0] . " / " . $women[0]); |
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
swagger: "2.0" | |
info: | |
description: "This is a sample client management API. The YAML definition for this API can be found at [https://gist.github.com/358ef6d256a69084357e139f8c7db19b.git](https://gist.github.com/358ef6d256a69084357e139f8c7db19b.git)" | |
version: "0.1.0" | |
title: "Client API" | |
contact: | |
email: "[email protected]" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" |
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
{ | |
"swagger": "2.0", | |
"info": { | |
"description": "This is a sample client management API. The YAML definition for this API can be found at [https://gist.github.com/358ef6d256a69084357e139f8c7db19b.git](https://gist.github.com/358ef6d256a69084357e139f8c7db19b.git)", | |
"version": "0.1.0", | |
"title": "Client API", | |
"contact": { | |
"email": "[email protected]" | |
}, | |
"license": { |
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
#!/bin/bash | |
# https://stackoverflow.com/questions/19665863/how-do-i-use-a-self-signed-certificate-for-a-https-node-js-server | |
FQDN=$1 | |
KEYDIR=keys | |
# make directories to work from | |
#mkdir -p server/ client/ all/ | |
mkdir -p $KEYDIR | |
# Create your very own Root Certificate Authority |
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
#!/bin/bash | |
# Whiptail examples - http://xmodulo.com/create-dialog-boxes-interactive-shell-script.html | |
oldhostname=$(hostname) | |
newhostname=$(whiptail --title "Hostname" --inputbox "Change hostname?" 10 60 $oldhostname 3>&1 1>&2 2>&3) | |
export exitstatus=$? | |
if [ $exitstatus != 0 ]; then | |
exit $exitstatus | |
fi | |
toemail=$(whiptail --title "gmail" --inputbox "Enter gmail (w/o @gmail.com) address to notify when script is done" 10 60 3>&1 1>&2 2>&3) | |
export exitstatus=$? |
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
#!/bin/bash | |
set -x | |
sudo cp /usr/share/zoneinfo/US/Pacific /etc/localtime | |
sudo apt-get remove -y wolfram-engine sonic-pi nodejs-legacy nodejs nodered | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get install -y emacs git htop dnsutils | |
git clone https://github.com/sdesalas/node-pi-zero.git | |
cd node-pi-zero | |
chmod +x install-node-v4.4.1.sh |