Skip to content

Instantly share code, notes, and snippets.

View duskvirkus's full-sized avatar
🇺🇦
declare variables not war

Dusk duskvirkus

🇺🇦
declare variables not war
View GitHub Profile
@duskvirkus
duskvirkus / ct-description-backup.sh
Created February 14, 2021 08:55
A basic script to backup descriptions from The Coding Train.
#!/bin/bash
TIME=$(date +'%m-%d-%Y-%H:%M:%S')
DIRNAME=codingtrain-yt-description-backup-$TIME
mkdir $DIRNAME
cd $DIRNAME
youtube-dl --skip-download --write-description https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw
@duskvirkus
duskvirkus / guess.go
Created April 22, 2020 15:53
Guessing With Go. A simple guessing game made in golang.
// Guessing With Go
// Violet Graham
// Based on guessing game created by Jack Mott (https://github.com/jackmott).
// In Games with go episode 2 (https://youtu.be/R9LPV44RLv4)
package main
import (
"bufio"
// Shadows of the Knight - Episode 1 Solution
// Violet Graham
// https://www.codingame.com/training/medium/shadows-of-the-knight-episode-1
#include <iostream>
#include <string>
using std::cin;
using std::cout;
using std::string;
// main.cpp
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofGLWindowSettings settings;
settings.setGLVersion(4, 5);
settings.setSize(1024, 768);

Suggestion Box API

Permissions

There are 3 levels are accesss to the endpoints.

  • Read: Can request any data that's read only. No key is needed.
  • Personal: Can write, modify, and delete objects assoicated with a user. OAuth key required.
  • Moderator: Full permissions. OAuth key required.
import bpy
import math
import re
from collections import namedtuple
def lookat(location, camera):
xIn = camera.location.x - location.x
yIn = camera.location.y - location.y
zIn = camera.location.z - location.z
int order = 10;
int N = int(pow(2, order));
int total = N * N;
PVector[] path = new PVector[total];
PImage img;
void setup() {
size(1024, 1024);
@duskvirkus
duskvirkus / heart.js
Created February 4, 2020 06:38
p5js heart sketch
function setup() {
createCanvas(1000, 1000);
noStroke();
fill(0);
translate(width / 2, 2 * height / 5);
let numPoints = 100;
beginShape();
@duskvirkus
duskvirkus / updateTitle.cpp
Created January 12, 2020 08:17
openFrameworks update title
// ofApp.h
constexpr const char* PROJECT_NAME = "Project";
constexpr const char* CREATOR = "Violet Graham";
void updateTitle();
// ofApp.cpp
//--------------------------------------------------------------
void ofApp::updateTitle() {
stringstream titleStream;
@duskvirkus
duskvirkus / mouse_threashold.vert
Created January 10, 2020 07:00
Mouse threashold shader.
// http://editor.thebookofshaders.com/
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;