Skip to content

Instantly share code, notes, and snippets.

View seemcat's full-sized avatar
😀
going full-time on content

mari seemcat

😀
going full-time on content
View GitHub Profile
@seemcat
seemcat / typeError.go
Last active January 8, 2019 17:55
Example of Type Error
package main
import (
"fmt"
)
func main() {
a := "hello"
b := 6
fmt.Println("a + b = ", a + b)
@seemcat
seemcat / algo.js
Created January 8, 2019 08:17
c0d3 solved in JS
const solution = (num1, num2) => {
return (num3) => {
return num1 + num2 + num3;
};
};
@seemcat
seemcat / algo.go
Last active January 8, 2019 08:21
c0d3 solved in Go
package main
func solution9(num1, num2 int) func(num3 int) int {
return func(num3 int) int {
return num1 + num2 + num3
}
}
// index.js
ZiggeoApi.token = "APP_TOKEN";
var init = () => {
var element = document.getElementById('recorder-embedding');
ZiggeoApi.V2.Recorder.findByElementPromise(element).success(mount);
}
@seemcat
seemcat / index.html
Last active September 14, 2018 18:16
//index.html
<html lang="en">
<head>
<link rel="stylesheet" href="//assets-cdn.ziggeo.com/v2-stable/ziggeo.css" />
<script src="//assets-cdn.ziggeo.com/v2-stable/ziggeo.js"></script>
</head>
<body>
@seemcat
seemcat / index.html
Last active September 14, 2018 18:16
// index.js
const getVideos = () => {
fetch("/videoTokens")
.then(res => res.json())
.then(myJson => {
const vidsToDisplay = myJson.reduce((acc, token) => {
acc += `<div class=
@seemcat
seemcat / server.js
Last active September 14, 2018 18:16
// server.js
app.get('/videoTokens', (req, res) => {
ZiggeoSdk.Videos.index({}, (vidInfos) => {
const videos = vidInfos.reduce((acc, vidInfo) => {
acc.push(vidInfo.token);
return acc;
}, []);
@seemcat
seemcat / server.js
Last active September 14, 2018 18:15
// server.js
app.get('/videoTokens', (req, res) => {
ZiggeoSdk.Videos.index({}, (vidInfos) => {
const videos = vidInfos.reduce((acc, vidInfo) => {
acc.push(vidInfo.token);
return acc;
}, []);
@seemcat
seemcat / server.js
Last active September 14, 2018 18:15
step 1 of server integration
// server.js
Ziggeo = require('ziggeo');
var ZiggeoSdk = new Ziggeo('YOUR APP TOKEN', 'YOUR_APP_PRIVATE_KEY', 'YOUR_APP_ENCRYPTION_KEY');
@seemcat
seemcat / index.html
Last active September 14, 2018 18:15
step 2 of browser integration
// index.html
<ziggeorecorder id="recorder-embedding" ziggeo-width=640 ziggeo-height=480 ziggeo-theme="minimalist" ziggeo-themecolor="red"></ziggeorecorder>