Skip to content

Instantly share code, notes, and snippets.

View pindlebot's full-sized avatar

Ben Gardner pindlebot

View GitHub Profile
#!/bin/bash
export LDFLAGS=-Wl,-rpath=/var/task/lib/
export PKG_CONFIG_PATH='/canvas/lib/pkgconfig'
export LD_LIBRARY_PATH='/canvas/lib':$LD_LIBRARY_PATH
C_INCLUDE_PATH=/canvas/include/
CPLUS_INCLUDE_PATH=/canvas/include/
export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
<?php
function zapier($url, $json, $headers) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(
70,
@pindlebot
pindlebot / index.js
Last active December 23, 2017 16:11
Moving a sprite with arrow keys in Three.js using RxJS observables.
var camera, scene, renderer;
var geometry, material, mesh;
init();
animate();
function init() {
camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 100);
camera.position.z = 1;
@pindlebot
pindlebot / elasticbeanstalk_websockets
Created October 28, 2017 01:42
elasticbeanstalk_websockets
files:
"/etc/nginx/conf.d/01_websockets.conf" :
mode: "000644"
owner: root
group: root
content : |
upstream nodejs {
server 127.0.0.1:8081;
keepalive 256;
}
@pindlebot
pindlebot / ReactJS modal example
Created December 22, 2016 08:27
How to implement a basic modal in ReactJS
const display = {
display: 'block'
};
const hide = {
display: 'none'
};
class Modal extends React.Component {
constructor(props) {
super(props);