Skip to content

Instantly share code, notes, and snippets.

@johnLate
johnLate / wiki.py
Last active August 29, 2015 14:18
#!/usr/bin/python3
# based on http://www.reddit.com/r/programming/comments/31fuae/i_made_a_command_line_tool_to_pull_summaries_from/cq1fnq9
from urllib import request, parse
import json
import sys
if len(sys.argv) < 2:
print('Usage: {} <subject>'.format(sys.argv[0]))
sys.exit(1)
@YajJackson
YajJackson / App.js
Last active November 11, 2019 21:06
React Context Demo
import React, { useState, useEffect, useContext, createContext } from 'react'
const UserContext = createContext()
const Login = ({ onLogin }) => {
const [name, setName] = useState('')
const [pass, setPass] = useState('')
return (
<form onSubmit={() => onLogin({ name, pass })}>
<input