Skip to content

Instantly share code, notes, and snippets.

@cto-4piens
cto-4piens / makingMeshInUnity.cs
Last active January 6, 2023 09:31
[unity] #unity #c-sharp
public class MeshMaker : MonoBehaviour {
[SerializeField] private Texture texture = null;
void Start() {
Vector3[] vertices = new Vector[] {
new Vector3(-1f, 1f, -1f), new Vector(1f, 1f, -1f), new Vector3(1f, -1f, -1f), new Vector3(-1f, -1f, -1f)
};
int[] triangles = new int[] {
0, 1, 2,
@cto-4piens
cto-4piens / what_is_docker.md
Created August 2, 2019 12:30
[docker] #docker
  • 도커는 컨테이너 기반의 오픈소스 가상화 플랫폼
## List Docker CLI commands
docker
docker container --help

## Display Docker version and info
docker --version
docker version
@cto-4piens
cto-4piens / 2-3-forced_material.md
Last active August 12, 2019 04:13
[Learn Three js] #Three.js #3D #javascript #html
  • scene.overrideMaterial

    • 씬 위에 존재하는 모든 오브젝트의 머티리얼을 오버라이드 한다.
    • scene.overrideMaterial = new THREE.MeshLambertMaterial({ color: 0xffffff })
  • THREE.MeshLambertMaterial

    • 매트한 느낌의 머티리얼
  • THREE.Scene의 주요 함수/속성

    • add(object)
  • 씬에 오브젝트나, 오브젝트 그룹을 추가한다.
@cto-4piens
cto-4piens / gist:bd2a87adab5f6c2610bc8ecd822e4256
Last active July 22, 2019 03:58
[nginx로 django 배포하기] #django #nginx
We couldn’t find that file to show.
@cto-4piens
cto-4piens / apollo-client-subscription.md
Created July 16, 2019 15:35
[apollo-client-subscription] #apollo-client #react

Query 컴포넌트의 reder props' prop으로 전잘되는 SubscribeToMore를 실행하면 웹소켓 통신의 subscription이 이루어진다.

''' subscribeToMore({ document: ${subscription_gql}, updateQuery: (prev, { subscriptionData }) => { //how to return the data.. //similar to redux's reducer //updateQuery를 정의하지 않으면 기존 쿼리 데이터를 그대로 교체한다. }

@cto-4piens
cto-4piens / apollo-server and prisma.md
Last active July 11, 2019 09:05
[apollo-server 와 prisma]

아폴로서버 프리즈마 워크플로우

  1. 아폴로서버 만들기
  2. 스키마 만들기
  3. 임시 리졸버 만들기
  4. 2번에서 작성한 스키마를 바탕으로 프리즈마 파일과 데이터모델 파일 만들기
  5. prisma deploy
  6. business logic 추가하기
@cto-4piens
cto-4piens / deploy react build files to googleCloudStorage
Created July 8, 2019 14:42
[google cloud storage에 빌드 완료한 리액트앱 배포하기] #GoogleCloudStorage #React #deployment
1. 버킷을 만든다.
2. CNAME을 등록한다.
3. TXT파일을 등록한다.
4. 버킷의 최상위 디렉토리에 index.html이 오도록 파일들을 업로드한다.
5. 버킷의 웹사이트 구성을 수정하여, 최상위 디렉토리 접속시 index.html을 보내도록한다.
@cto-4piens
cto-4piens / server.js
Created July 8, 2019 13:44
[express로 build완료한 react app 서빙하기] #express #react-app #build
//백엔드와 프론트엔드 폴더가 완전히 분리되어 있는 상태이다.
const express = require('express');
const path = require('path');
const app = express();
const staticPath = path.join(__dirname, '../frontend/build')
console.log(staticPath)
app.use(express.static(staticPath));
@cto-4piens
cto-4piens / djangoStart.md
Created February 23, 2019 02:27
[How to start django project]
@cto-4piens
cto-4piens / materialUI.md
Created February 18, 2019 02:56
[material-ui]

===