This file contains hidden or 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
// Attach to the camera asset | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class FollowCamera : MonoBehaviour { | |
private int screenWidth; | |
private int screenHeight; | |
public int speed = 5; |
This file contains hidden or 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 User = require('../../models/User'); | |
const UserSession = require('../../models/UserSession'); | |
module.exports = (app) => { | |
/* | |
* Sign up | |
*/ | |
app.post('/api/account/signup', (req, res, next) => { | |
const { body } = req; |
This file contains hidden or 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 'whatwg-fetch'; | |
import { | |
getFromStorage, | |
setInStorage, | |
} from '../../utils/storage'; | |
class Home extends Component { | |
constructor(props) { |
This file contains hidden or 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 'whatwg-fetch'; | |
import openSocket from 'socket.io-client'; | |
const socket = openSocket('http://localhost:8000'); | |
class Home extends Component { | |
constructor(props) { | |
super(props); |
This file contains hidden or 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 from 'react'; | |
import PropTypes from 'prop-types'; | |
export const BANK_ACCOUNT_FORM_COUNTRY = 'country'; | |
export const BANK_ACCOUNT_FORM_CURRENCY = 'currency'; | |
export const BANK_ACCOUNT_FORM_ROUTING_NUMBER = 'routing_number'; | |
export const BANK_ACCOUNT_FORM_ACCOUNT_NUMBER = 'account_number'; | |
export const BANK_ACCOUNT_FORM_ACCOUNT_HOLDER_NAME = 'account_holder_name'; | |
export const BANK_ACCOUNT_FORM_ACCOUNT_HOLDER_TYPE = 'account_holder_type'; |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 1MrmdPKc3xb38HfwZbeeLSM4r42RhNU4tG https://explorer.blockstack.org/address/1MrmdPKc3xb38HfwZbeeLSM4r42RhNU4tG |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 13TYandebFM6qEWpekgneyCAmVGqgyibaM https://explorer.blockstack.org/address/13TYandebFM6qEWpekgneyCAmVGqgyibaM |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 1AxH83ExEXXAwa86SASfSv3Pw1chXLAQNz https://explorer.blockstack.org/address/1AxH83ExEXXAwa86SASfSv3Pw1chXLAQNz |
This file contains hidden or 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
# Demo of using the ls command in Python | |
# I have another one here: https://gist.github.com/keithweaver/f77c5001e6e38b7c8fa5a4fb1505bc73 | |
# But I really didn't want it to be the current path. I want to pass the path | |
# in. I found this example of listing all files in a path from SO: | |
# https://stackoverflow.com/questions/3207219/how-do-i-list-all-files-of-a-directory | |
# Works perfect. | |
from os import listdir | |
from os.path import isfile, join | |
mypath = '../'; |
This file contains hidden or 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
# Demo of using the ls command in Python | |
# https://stackoverflow.com/questions/4514751/pipe-subprocess-standard-output-to-a-variable | |
import subprocess | |
proc = subprocess.Popen('ls', stdout=subprocess.PIPE) | |
output = proc.stdout.read() | |
print output | |
# My terminal: |