http://webmem.hatenablog.com/entry/how-to-synchronize-Atom-settings-by-sync-settings
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
<craft> | |
<info> | |
<title>Untitled</title> | |
</info> | |
<param name="h" type="int" default="20" | |
label="height of the cylinder"/> | |
<param name="n" type="int" default="3" | |
label="number of spheres"/> |
Use C++ dynamic library from Node.js with node-ffi
$ g++ -dynamiclib -o libhello.dylib hello.cpp
$ ls
libhello.dylib hello.cpp hello.js
$ node hello.js
hello world
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
#include "opengl.h" | |
void OpenGL::initBuffers() { | |
glGenVertexArrays(1, &vaoMesh); | |
glBindVertexArray(vaoMesh); | |
glGenBuffers(1, &vboVertices); | |
glGenBuffers(1, &vboNormals); | |
glGenBuffers(1, &vboUVs); | |
glGenBuffers(1, &vboFaces); |
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
#include "mesh.h" | |
void Mesh::set(const Eigen::MatrixXf &V_, const Eigen::MatrixXi &F_) { | |
V = V_; | |
F = F_; | |
computeNormals(); | |
computeAdjacencyMatrix(); | |
computeEdgeLength(); |
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
#version 330 | |
precision lowp float; | |
uniform vec3 color; | |
out vec4 outColor; | |
void main() { | |
outColor = vec4(color, 1.0); | |
} |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>High frequency sound generator</title> | |
<script> | |
var WAcontext, oscillator, isPlay; | |
initSound(); | |
function initSound() { | |
WAcontext = new AudioContext || new webkitAudioContext; |
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
// make sure to select "Box Colider" option at the Inspector panel | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DragObject : MonoBehaviour { | |
//float distance = 10; |