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 https = require("https"), | |
fs = require("fs"); | |
var payload = JSON.stringify({ | |
user_credentials: "YOUR_API_KEY_HERE", | |
doc: { | |
document_content: "<!DOCTYPE html><html><head><title>Javascript PDF Sample</title></head><body>Hello from Javascript!</body></html>", | |
name: "test.pdf", | |
document_type: "pdf", | |
test: true |
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 | |
if [ -z "$1" ]; then | |
echo "Usage: sudo $0 /dev/sdh1" | |
exit 1; | |
fi | |
dd if=$1 of=/dev/null & pid=$! | |
while true; do | |
ps -p$pid --no-heading || break; | |
echo "-- $(date) ------------------"; |
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
-(void)setupView:(GLView*)view | |
{ | |
const GLfloat zNear = -0.01, zFar = 1000.0, fieldOfView = 45.0; | |
GLfloat size; | |
glMatrixMode(GL_PROJECTION); | |
glEnable(GL_DEPTH_TEST); | |
glDepthMask(GL_TRUE); | |
size = zNear * tanf(DEGREES_TO_RADIANS(fieldOfView) / 2.0); |