Skip to content

Instantly share code, notes, and snippets.

🐉
!

kumavis kumavis

🐉
!
Block or report user

Report or block kumavis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kumavis
kumavis / gist:3fed9853dd131daf0960
Last active Aug 29, 2015
Block strings in javascript
View gist:3fed9853dd131daf0960
(function (){/*
hey look at me
im a block string
a single string
across many lines
neat, huh?
*/}).toString().slice(15,-4)
View gist:f7e5e10c118aceb09921
/* Sachie Holtz CA110 pl5.cpp
programming Lab 5: Palindrome Program
To examine a user-entered string to determine if it's a palindrome.
*/
#include <iostream>
#include <cstring>
using namespace std;
View gist:74e7c9f11ccae61bb1d1
Connected play
Whyville
Breeding dragons
Habbohotel
Kidsdiy .com
Cheating! Cheating is thinking about learning and challenges.
Design the challenge such that cheating is learning.
Teachable moment and cheat able moment
Looking for cheating in user data
Mischievous learner
View gist:57144f2d72f46d1cac4b
// Utility - changes the parent but preserves global position + rotation
function orientUnderParent( target, parent ) {
// calculate new pos
var newPos = new THREE.Vector3()
newPos.setFromMatrixPosition( target.matrixWorld )
parent.worldToLocal( newPos )
target.position = newPos
// calculate new rot
@kumavis
kumavis / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var rtcDataStream = require('rtc-data-stream')
var quickconnect = require('rtc-quickconnect')
var generateName = require('sillyname');
// setup DOM
var output = document.createElement('textarea')
output.style.width = "100%"
output.style.height = "80%"
output.style.resize = "none"
document.body.appendChild(output)
View gist:5414e8102d2fa5eb4dd9
(function () {
function c() {
var e = document.createElement("link");
e.setAttribute("type", "text/css");
e.setAttribute("rel", "stylesheet");
e.setAttribute("href", f);
e.setAttribute("class", l);
document.body.appendChild(e)
}
function h() {
@kumavis
kumavis / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
Rx = require('rx-dom')
main()
// Search Wikipedia for a given term
function searchWikipedia(term) {
var cleanTerm = window.encodeURIComponent(term)
var url = 'http://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=' + cleanTerm + '&callback=JSONPCallback'
return Rx.DOM.jsonpRequest(url)
@kumavis
kumavis / index.js
Created Nov 1, 2014
requirebin sketch
View index.js
var esprima = require('esprima')
var escodegen = require('escodegen')
var treeify = require('treeify').asTree
var match = require('pattern-match')
var isArray = require('is-array')
// setup registry
var registry = {}
@kumavis
kumavis / index.js
Created Jan 16, 2015
requirebin sketch
View index.js
var quickconnect = require('rtc-quickconnect');
var createDataStream = require('rtc-dcstream');
quickconnect('http://rtc.io/switchboard', { room: 'dnode-test' })
.createDataChannel('primary')
.on('channel:opened:primary', function(id, dc) {
var stream = createDataStream(dc)
connectionReady(stream)
})
@kumavis
kumavis / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var quickconnect = require('rtc-quickconnect');
var createDataStream = require('rtc-dcstream');
var dnode = require('dnode');
quickconnect('https://switchboard.rtc.io/', { room: 'dnode-test' })
.createDataChannel('primary')
.on('channel:opened:primary', function(id, dc) {
var stream = createDataStream(dc)
connectionReady(stream)
})
You can’t perform that action at this time.