Skip to content

Instantly share code, notes, and snippets.

View talentlessguy's full-sized avatar
🏖️
Existing

v1rtl talentlessguy

🏖️
Existing
View GitHub Profile
@talentlessguy
talentlessguy / createGeometry.ts
Created April 2, 2020 11:28
morph geometry cube
import * as THREE from 'three'
export function createGeometry() {
const geometry = new THREE.BoxBufferGeometry(0.8, 0.8, 0.8, 4, 4, 4)
// create an empty array to hold targets for the attribute we want to morph
// morphing positions and normals is supported
geometry.morphAttributes.position = []
// the original positions of the cube's vertices
@talentlessguy
talentlessguy / NavBar.jsx
Created February 10, 2020 15:25
NavBar.tsx
import React, { useState } from 'react'
import { Image, Box, Link as RebassLink, Flex, Button, SxStyleProp } from 'rebass'
import Link from 'next/link'
import HashLink from './HashLink'
interface LinkInterface {
href: string
text: string
}
@talentlessguy
talentlessguy / react.d.ts
Created December 6, 2019 14:29
Preact compat typings
import { AnyComponent, FunctionalComponent, RenderableProps } from 'preact'
export { useState, useRef, useEffect } from 'preact/hooks'
export {
Attributes,
FunctionalComponent as SFC,
AnyComponent as ComponentType,
FunctionalComponent as FunctionComponent,
AnyComponent as JSXElementConstructor,
@talentlessguy
talentlessguy / babel.config.js
Created November 9, 2019 17:16
Styled JSX + PostCSS
module.exports = {
presets: [
[
'next/babel',
{
'styled-jsx': {
plugins: [
[
'styled-jsx-plugin-postcss',
{
@talentlessguy
talentlessguy / apollo.js
Created September 28, 2019 12:05
Apollo init
import withApollo from 'next-with-apollo'
import ApolloClient, { InMemoryCache, HttpLink } from 'apollo-boost'
import { parseCookies } from 'nookies'
export default withApollo(
({ initialState }) =>
new ApolloClient({
link: new HttpLink({
uri: 'https://api.komfy.now.sh/graphql',
headers: {
package main
import (
"os"
"time"
"log"
// excel "github.com/360EntSecGroup-Skylar/excelize"
env "github.com/joho/godotenv"
tb "gopkg.in/tucnak/telebot.v2"
)
@talentlessguy
talentlessguy / editor.js
Created July 25, 2019 09:53
Blog with Preact, MongoDB and Node.js
import { Link } from '@reach/router'
import { useState, useEffect } from 'react'
import html from './html'
const Editor = () => {
const [title, setTitle] = useState('')
const [slug, setSlug] = useState('')
const [story, setStory] = useState('')
const [reply, setReply] = useState('')
mtllib figure.mtl
o Sphere
v 13.032698 6.743820 6.617107
v 13.285507 6.805155 6.530835
v 13.300390 6.877423 6.432388
v 13.298800 6.908429 6.348693
v 13.320424 6.995495 6.306604
v 13.447849 7.161360 6.300313
v 13.467219 7.241513 6.211162
v 13.515799 7.192785 6.031226
import ts from 'rollup-plugin-typescript2'
import babel from 'rollup-plugin-babel'
import resolve from 'rollup-plugin-node-resolve'
import graphql from 'rollup-plugin-graphql'
import postcss from 'rollup-plugin-postcss-modules'
import workbox from 'rollup-plugin-workbox-build'
import cjs from 'rollup-plugin-commonjs'
export default {
input: './App.tsx',
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Welcome file</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>