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
uniform float time; | |
varying vec2 vUv; | |
void main() { | |
vec3 color = vec3(1.0); | |
float sun = step(mod(vUv.y * 20. + time, 1.), -0.2 + 0.35 * vUv.y * 3.7); | |
color.x *= sun; | |
color.y *= sun * (0.6 + vUv.y - 0.7 ); | |
color.z = 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
function _init() | |
cls() | |
print("stars") | |
t = 0 | |
stars = {} | |
for i=1,25 do | |
add(stars,agent.new(i)) | |
end | |
for s in all(stars) do | |
s:reset() |
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
server { | |
server_name example.com; | |
access_log /var/log/nginx/example.com.access.log; | |
error_log /var/log/nginx/example.com.error.log; | |
gzip on; | |
gzip_types text/css application/javascript application/json image/svg+xml; |
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, { createContext, useContext, useState, useEffect } from "react" | |
type Props = { | |
children: React.ReactNode | |
} | |
type Context = { | |
count: number | |
increment: () => void | |
} |
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
#!/usr/bin/env python | |
import socket,sys,subprocess,os,json,pygame,time,bs4,requests,random,fnmatch,urllib,tweepy,datetime,sqlite3 | |
from glob import glob | |
print 'dankbot is born...' | |
#establish working and database paths | |
homedir = '/home/pi/dankbot/' | |
dirsb = '/home/pi/soundboard/' | |
db_file = '/var/www/dank.db' |
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
class Agent { | |
float a; | |
float b; | |
Agent(float _a, float _b) { | |
a = _a; | |
b = _b; | |
} | |
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
// TO USE THIS: | |
import { useEffect, useState } from 'react' | |
import { FormInstance } from 'antd/lib/form' | |
type Props<T> = { | |
form: FormInstance<T> | |
id: string // some unique identifier that matches whatever you're editing | |
} |
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 Axios from 'axios' | |
import React, { createContext, useContext } from 'react' | |
type Props = { | |
children: React.ReactNode | |
baseURL?: string | |
} | |
type Context = { | |
get: <T>(path: string) => Promise<T> |
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
impor { state } from './state' | |
button.onclick = () => { | |
console.log("state.count", state.count) | |
} |
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 { updateChild } from '../utils' | |
export default () => | |
AFRAME.registerComponent('grabber', { | |
schema: { | |
hand: { type: 'string' }, | |
}, | |
init() { | |
console.log('grabber init', this.data.hand) | |
this.otherEl = null |
OlderNewer