Skip to content

Instantly share code, notes, and snippets.

View blender-create-tms.py
import bpy
scene = bpy.context.scene
for key, val in bpy.data.collections.items():
if key == 'Collection':
continue
# remove all others
bpy.data.collections.remove(val)
View .editorconfig
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
View basicPubSub.py
'''
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
View gist:523e461e2d3b329d2a2b99c439a192ec
import jsonrpc
dispatcher = jsonrpc.Dispatcher()
def calculate(a):
return a + 2
dispatcher.add_method(calculate)
View test.html
<head>
<script>
// Get A WebGL context
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("experimental-webgl");
// setup a GLSL program
var vertexShader = createShaderFromScriptElement(gl, "2d-vertex-shader");
var fragmentShader = createShaderFromScriptElement(gl, "2d-fragment-shader");
@SiggyF
SiggyF / index.html
Last active Aug 29, 2015 — forked from mbostock/.block
Update
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script src="http://smeijer.github.io/GeoSearch/js/l.control.geosearch.js"></script>
@SiggyF
SiggyF / gentoo-mount
Last active Dec 23, 2015
Setup of gentoo system
View gentoo-mount
# mount
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
# mount
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev