Skip to content

Instantly share code, notes, and snippets.

View halvardos's full-sized avatar

Halvard Eggen halvardos

View GitHub Profile
[Trace - 12:34:51] Sending notification 'textDocument/didChange'.
Params: {
"textDocument": {
"uri": "file:///Users/halvard/synq/doppelganger/src/containers/Authenticate.js",
"version": 142
},
"contentChanges": [
{
"text": "const test () => {\n\n \n};\n"
}
{
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.fontFamily": "Operator Mono",
"editor.lineHeight": 0,
"editor.minimap.enabled": false,
"editor.fontWeight": "100",
"files.insertFinalNewline": true,
"editor.formatOnPaste": true,
"editor.renderLineHighlight": "gutter",
@halvardos
halvardos / the_office.json
Created October 12, 2017 11:54
the office example
{
"nor": {
"title": {
"season": "Sesong 6",
"series": "The Office (US)",
"content": "Murder"
},
"images": {
"season": {
"url":
{
"started_at": "2017-09-06T08:55:20.801Z",
"json_query": {
"database": 2,
"type": "native",
"native": {
"query": "SELECT COUNT(*) FROM videos WHERE project = {{projectID}} AND file_state = 'uploaded';",
"template_tags": {
"projectID": {
"id": "75ea3102-e668-074e-5fc2-c14fb40287f4",
accept-ranges:bytes
access-control-allow-methods:PUT, POST, GET, HEAD
access-control-allow-origin:*
access-control-expose-headers:ETag
access-control-max-age:3000
content-length:185180
content-type:video/MP2T
date:Wed, 12 Apr 2017 09:40:02 GMT
etag:"1d02b85b47c1497251562e3a0af367bd"
last-modified:Thu, 06 Apr 2017 12:05:34 GMT
accept-ranges:bytes
access-control-allow-methods:PUT, POST, GET, HEAD
access-control-allow-origin:*
access-control-expose-headers:ETag
access-control-max-age:3000
content-length:182548
content-type:video/MP2T
date:Wed, 12 Apr 2017 09:40:23 GMT
etag:"7c6df49d4841b81929324125ff65444d"
last-modified:Thu, 06 Apr 2017 12:05:34 GMT
uploaded_videos_pre_write: function(bundle) {
bundle.request.method = 'POST';
bundle.request.headers['X-Metabase-Session'] = bundle.auth_fields.user_token;
delete bundle.request.headers.username;
delete bundle.request.headers.password;
// the id of the card we want to query on metabase
var cardID = 99999;
var query = '{"cardID":'+cardID+',"parameters":[{"type":"category","target":["variable",["template-tag","customerID"]],"value":"'+bundle.action_fields_full.customerAccount+'"}]}';
bundle.request.data = query;
var Zap = {
get_session_info: function(bundle) {
var user_token,
request_data,
token_request_payload,
token_response,
parsed_response;
request_data = {
import synq
import os
# Init the library by setting API key
api_key = os.environ['SYNQ_API_KEY']
videoAPI = synq.VideoAPI(api_key)
# Get the video id of the created video
video_id = "0c19b46991ae49be994cec9f3909329a"