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
var questions = [ | |
{ id:'fname', text:'First Name', answerType:'str' }, | |
{ id:'lname', text:'Last Name', answerType:'str' }, | |
{ id:'age', text:'Age', answerType:'int' }, | |
{ id:'weight', text:'Weight', answerType:'float' } | |
] | |
function ask(question, callback) { | |
var stdin = process.stdin, stdout = process.stdout; |
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
#!/bin/bash | |
# | |
# When you are working on your macbook sitting in cafe and you have to go pee, | |
# you need some way to guard you machine. | |
# | |
# Start this script, remove any earphones, and go do the job. | |
# The assumption is the thief will close the lid of the laptop before taking it away. | |
# This script detects the closing of the lid and plays some loud audio that will | |
# likely distract the thief and/or grab attention of nearby people, making the |
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 sys | |
from OCC.gp import gp_Pnt | |
from OCC.GC import GC_MakeSegment | |
from OCC.BRepBuilderAPI import \ | |
BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeFace, BRepBuilderAPI_MakeWire,\ | |
BRepBuilderAPI_MakeShell, BRepBuilderAPI_MakeSolid | |
from OCC.BRep import BRep_Builder | |
from OCC.TopoDS import TopoDS_Shell, TopoDS_Solid | |
from OCC import StlAPI |
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
### Keybase proof | |
I hereby claim: | |
* I am jay3sh on github. | |
* I am jay3sh (https://keybase.io/jay3sh) on keybase. | |
* I have a public key ASDisveofvyc0qtIYvkSUPKfTfFhBhMTHkUTUUP9SQKH1Ao | |
To claim this, I am signing this object: |
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
cmake_minimum_required(VERSION 3.0.0) | |
project(GSL) | |
set(CMAKE_C_COMPILER "/usr/bin/gcc") | |
set(CMAKE_VERBOSE_MAKEFILE ON) | |
file(GLOB_RECURSE SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/*.c) | |
file(GLOB_RECURSE INC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/*.h) |
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 foo(args) { | |
var i, j, k; | |
// ... | |
// j acquires some interesting value | |
// Who called foo when j took this interesting value? | |
// | |
var e = new Error('dummy'); | |
var stack = e.stack.replace(/^[^\(]+?[\n$]/gm, '') | |
.replace(/^\s+at\s+/gm, '') |
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
<html> | |
<head> | |
<title></title> | |
<script type="text/javascript"> | |
var fragShaderSource = "\ | |
precision highp float;\ | |
uniform vec4 u_color;\ | |
void main(void) {\ | |
gl_FragColor = u_color;\ | |
}\ |
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
# While invoking a function you don't have to put the arguments in parenthesis. | |
# Instead of writing | |
console.log(message) | |
# You can write | |
console.log message | |
# Although this is convenient, it can be confusing for nested function calls | |
foo bar 2,3 | |
# is equivalent to | |
foo(bar(2,3)) |
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
methodfoo : (arg0) -> | |
func = => x = @someproperty | |
func() |
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
/* | |
* This Program hangs for values of TOTAL >10 | |
* consuming about 90% when run with OCC 6.5.3 on Ubuntu 11.04 | |
* | |
* Build instructions | |
* | |
* g++ -o forum_main.o -c -I$OCC_INSTALL_DIR/inc forum_main.cpp | |
* | |
* g++ -o main -Xlinker -rpath -Xlinker $OCC_INSTALL_DIR/lib forum_main.o \ | |
* -L$OCC_INSTALL_DIR/lib -lTKernel -lPTKernel -lTKMath -lTKService -lTKV3d -lTKV2d -lTKBRep -lTKIGES -lTKSTL -lTKSTEP -lTKSTEPAttr -lTKSTEP209 -lTKSTEPBase -lTKShapeSchema -lTKGeomBase -lTKGeomAlgo -lTKG3d -lTKG2d -lTKXSBase -lTKPShape -lTKShHealing -lTKHLR -lTKTopAlgo -lTKMesh -lTKPrim -lTKCDF -lTKBool -lTKBO -lTKFillet -lTKOffset |
NewerOlder