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
use std::sync::RwLock; | |
#[macro_use] | |
extern crate lazy_static; | |
lazy_static! { | |
static ref MODELS: RwLock<i32> = RwLock::new(0); | |
} | |
fn update_it(number: i32) { | |
println!("You wanted me to update to {}", number); |
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
FROM node:8 | |
RUN npm install -g write-good | |
ADD clone-run.sh /tmp/clone-run.sh |
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
{ | |
repository(owner: "jwo", name:"react-hover-image"){ | |
url | |
pullRequest(number: 4){ | |
number | |
url | |
author { | |
avatarUrl | |
login | |
resourcePath |
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
{ | |
viewer { | |
repositories(privacy: PUBLIC, first: 3, orderBy: {field: PUSHED_AT, direction: DESC}) { | |
nodes { | |
nameWithOwner | |
url | |
} | |
} | |
} | |
} |
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
const express = require("express") | |
const app = express() | |
var passport = require("passport") | |
var session = require("express-session") | |
var GitHubStrategy = require("passport-github2").Strategy | |
const GITHUB_CLIENT_ID = "your-client-id-here" // or get from process.env.GITHUB_CLIENT_ID | |
const GITHUB_CLIENT_SECRET = "your-client-secret-here" // or get from process.env.GITHUB_CLIENT_SECRET | |
const GITHUB_CALLBACK_URL = "http://localhost:5000/auth/github/callback" // or get from process.env.GITHUB_CALLBACK_URL |
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 React, { Component } from "react" | |
import { compose } from "recompose" | |
import { | |
withScriptjs, | |
withGoogleMap, | |
GoogleMap, | |
Marker, | |
InfoWindow | |
} from "react-google-maps" |
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
const express = require("express"); | |
const mustache = require("mustache-express"); | |
const bodyParser = require("body-parser"); | |
const app = express(); | |
// Rest of the stuff here | |
// DONT FORGET THIS | |
module.exports = app; |
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
const mongoose = require('mongoose'); | |
mongoose.Promise = require('bluebird'); | |
mongoose.connect('mongodb://localhost:27017/eighties'); | |
const gameSchema = new mongoose.Schema({ | |
name: {type: String, required: true}, | |
imageUrl: {type: String, required: true}, | |
tags: [String], | |
year: {type: Number, required: true}, | |
link: {type: String, required: true} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style media="screen"> | |
.character { | |
display: flex; | |
width: 550px; |
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
function properCase(sentence){ | |
const words = sentence.split(' '); | |
let newWords = [] | |
// Start the big spoon | |
for(let i = 0; i < words.length; i++){ | |
const word = words[i]; |
NewerOlder