Skip to content

Instantly share code, notes, and snippets.

@fusepilot
fusepilot / gatsby-node.js
Created January 19, 2020 19:18
Gatsby Schema @link to MarkdownRemark slug from SitePage
const path = require("path");
const { createFilePath } = require(`gatsby-source-filesystem`);
exports.createPages = async ({ graphql, actions }) => {
const result = await graphql(
`
{
allMarkdownRemark(sort: { fields: [frontmatter___date], order: DESC }) {
edges {
node {
{ geocoded_waypoints:
[ { geocoder_status: 'OK',
place_id: 'ChIJGQCRws6kwoARq_Uj_7UKF7Q',
types: [ 'locality', 'political' ] },
{ geocoder_status: 'OK',
place_id: 'ChIJE9on3F3HwoAR9AhGJW_fL-I',
types: [ 'locality', 'political' ] } ],
routes:
[ { bounds:
{ northeast: { lat: 34.0550021, lng: -118.2435703 },
@fusepilot
fusepilot / AE-CMakeLists.txt
Created January 26, 2016 00:32 — forked from dbr/AE-CMakeLists.txt
OCIO AE CMakeLists.txt stuff
# src/aftereffects/CMakeLists.txt
if(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup")
endif()
#set(AE_SDK "${CMAKE_SOURCE_DIR}/ext/Adobe After Effects CS5 SDK")
set(AE_SDK "${CMAKE_SOURCE_DIR}/ext/aesdk")
message("Exteranl thing: ${EXTERNAL_INCLUDE_DIRS}")
@fusepilot
fusepilot / css-attributes.pegjs
Last active May 23, 2019 02:56
Peg.js Simple CSS Attribute Parsing
/*
* CSS like attribute parsing.
*
* Parses strings like `comp[name=myComp] > layer[name=myLayer light=true selected]` to objects.
*/
{
function mergeProps(array){
var merged = {};
ABCEXPORT_CAMERAS
ABCEXPORT_FORMAT
ABCEXPORT_FORMAT_HDF5_LEGACY
ABCEXPORT_FORMAT_OGAWA
ABCEXPORT_FRAME_END
ABCEXPORT_FRAME_START
ABCEXPORT_FRAME_STEP
ABCEXPORT_GLOBAL_MATRIX
ABCEXPORT_GROUP
ABCEXPORT_HAIR
@fusepilot
fusepilot / gist:f18599d8c2489b8be1ac
Last active September 27, 2016 13:34
C4D Activate Camera on Frame Tag
import c4d
import re
"""
1. Create python tag on camera and add this code to it.
2. Duplicate tag to other cameras.
3. Rename your camera layers to match the frame you want it be be active on, e.g., cam-1, Camera01, 01.
"""
def main():
@fusepilot
fusepilot / gist:8b7a5ef1099a2f3ca4e1
Created May 16, 2015 20:29
remove circular references from jsx object
function(data, out) {
var e, k, results;
if (out == null) {
out = {};
}
if (!data) {
return void 0;
}
if (typeof data === 'object') {
results = [];
/* global Utility */
/* global _ */
/* global SimpleSchema */
/* global MongoObject */
/* global doValidation1:true */
function doTypeChecks(def, keyValue, op) {
var expectedType = def.type;
// String checks
root@ve:~# padrino g project padrino_test
/usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.9.15/lib/padrino-core/cli/base.rb:73:in `require': no such file to load -- padrino-gen/command (LoadError)
from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.9.15/lib/padrino-core/cli/base.rb:73:in `generate'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.0/lib/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.0/lib/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.0/lib/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.9.1/gems/thor-0.14.0/lib/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.9.1/gems/padrino-core-0.9.15/bin/padrino:8:in `<top (required)>'
from /usr/bin/padrino:19:in `load'
from /usr/bin/padrino:19:in `<main>'
get :index, :with => :id do
@page = Page.find_by_slug(params[:id])
not_found unless @page
render "pages/show"
end