Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
/** | |
* Changes XML to JSON | |
* Modified version from here: http://davidwalsh.name/convert-xml-json | |
* @param {string} xml XML DOM tree | |
*/ | |
function xmlToJson(xml) { | |
// Create the return object | |
var obj = {}; | |
if (xml.nodeType == 1) { |
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<title>Record WebGL to WebM (Chrome only)</title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="styles.css" charset="utf-8"> | |
</head> | |
<body> | |
<div class="buttons"> |
require('isomorphic-fetch'); | |
fetch('https://1jzxrj179.lp.gql.zone/graphql', { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ query: '{ posts { title } }' }), | |
}) | |
.then(res => res.json()) | |
.then(res => console.log(res.data)); |
import json | |
import bpy | |
import bmesh | |
def createLine(name, pointList, thickness): | |
bpy.ops.mesh.primitive_plane_add(size=2, view_align=False, enter_editmode=False, location=(0, 0, 0)) | |
obj = bpy.context.object | |
me = obj.data | |
bpy.ops.object.editmode_toggle() | |
bm = bmesh.from_edit_mesh(me) |