Skip to content

Instantly share code, notes, and snippets.

View claytantor's full-sized avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile
@claytantor
claytantor / gist:dd25a654f9a1f10a343d
Created July 5, 2014 17:36
apache2-wsgi-ssl-http.conf
<VirtualHost gitpatron.com:443>
ServerAdmin admin@gitpatron.com
ServerName gitpatron.com
SSLEngine on
SSLCertificateKeyFile /etc/ssl/certs/gitpatron.key
SSLCertificateFile /etc/ssl/certs/gitpatron_com.crt
SSLCertificateChainFile /etc/ssl/certs/gitpatron_com.ca-bundle
</VirtualHost>
@claytantor
claytantor / scene1.json
Last active August 29, 2015 14:04
looking to create a scene graph for three.js and jquery
{
"scene":{
"renderer":{
"id":"main-renderer",
"type":"WebGLRenderer",
"alpha":true
},
"cameras":[
{
"id":"camera1",
@claytantor
claytantor / gldev.jquery.js
Created July 20, 2014 20:09
simple threejs plugin for jquery.
// RequestAnimationFrame shim - Source: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
window.requestAnimFrame = ( function( callback ) {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback ) {
window.setTimeout( callback, 1000 / 60 );
};
@claytantor
claytantor / gldev4.html
Created August 6, 2014 00:39
single page simulation
<!DOCTYPE html>
<html>
<head>
<title>P5</title>
<script src="{{ STATIC_URL }}js/jquery-1.11.1.min.js"></script>
<script src="{{ STATIC_URL }}js/jquery-ui-core.min.js"></script>
<script src="{{ STATIC_URL }}js/three.js"></script>
<script src="{{ STATIC_URL }}js/gldev.jquery.js"></script>
<script>
$( document ).ready(function() {
@claytantor
claytantor / gist:e789334a76d48c2da504
Created October 20, 2014 05:07
Command Line curl JSON
curl -H "Content-Type: application/json" -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login
@claytantor
claytantor / gist:dfc58203690de7ebbec2
Last active August 29, 2015 14:08
Reset your postgres user password
[ec2-user@ip-10-45-187-20 ~]$ pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/pgsql
HTMLDIR = /usr/share/doc/pgsql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/pgsql
LOCALEDIR = /usr/share/locale
@claytantor
claytantor / gist:a4f7ac88e96873fa9461
Created November 1, 2014 16:47
google auth2 views.py
import os
import logging
import httplib2
from apiclient.discovery import build
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.http import HttpResponseBadRequest
from django.http import HttpResponseRedirect
@claytantor
claytantor / gist:b75540e765540c775994
Created November 22, 2014 01:52
diatomic hello world
[ec2-user@ip-10-65-176-236 datomic-free-0.9.5067]$ bin/groovysh
Nov 22, 2014 1:45:44 AM java.util.prefs.FileSystemPreferences$2 run
INFO: Created user preferences directory.
Groovy Shell (1.8.9, JVM: 1.6.0_33)
Type 'help' or '\h' for help.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> import datomic.Peer
import datomic.Peer
===> [import datomic.Peer]
groovy:000> uri = "datomic:mem://hello"
@claytantor
claytantor / gist:b64b4c9fb3177761dd1b
Created November 23, 2014 04:41
DatomicClient for scala
package db
import scala.language.reflectiveCalls
import datomisca._
import scala.concurrent._
import scala.concurrent.duration.Duration
import java.util.{Date => JDate}
import datomisca.executioncontext.ExecutionContextHelper._
class DatomicClient {
@claytantor
claytantor / gist:7cd28eaef43d42df9413
Created November 25, 2014 01:26
remove .idea files from git
git rm --cached *.xml
git rm --cached vcs.xml
git rm --cached modules.xml
git rm --cached misc.xml
git rm --cached encodings.xml.xml
git rm --cached encodings.xml
git rm --cached deployment.xml
git rm --cached dataSources.xml
git rm --cached dataSources.ids
git rm --cached callpug.iml