Skip to content

Instantly share code, notes, and snippets.

import bpy
from math import *
def createMeshFromData(name, origin, verts, edges, faces):
# Create mesh and object
me = bpy.data.meshes.new(name+'Mesh')
ob = bpy.data.objects.new(name, me)
ob.location = origin
ob.show_name = False
# Link object to scene and make active
$ kubectl get clusterrole onboarding -o yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"rbac.authorization.k8s.io/v1beta1","kind":"ClusterRole","metadata":{"annotations":{},"name":"onboarding","namespace":""},"rules":[{"apiGroups":["*"],"resources":["namespace,role,rolebinding,resourcequota"],"verbs":["*"]}]}
creationTimestamp: 2018-10-01T20:56:41Z
name: onboarding
resourceVersion: "753562"
<?php
$services = json_decode(getenv("VCAP_SERVICES"), true);
$host = $services['user-provided'][0]['credentials']['alsechohost'];
echo "Host from environment: $host";
if (isset($_GET['whatisaid'])) {
$ch = curl_init("http://$host/echo.php?message=".$_GET['whatisaid']);
<?php
header('Content-Type: application/json');
echo '{"message": "'.$_GET['message'].'"}';
error_log("ECHO MESSAGE: ".$_GET['message'], 0);
?>