This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from panda3d.core import CharacterJoint, CharacterSlider, CharacterVertexSlider | |
from panda3d.core import AnimBundle, AnimGroup, AnimChannelScalarDynamic | |
from panda3d.core import AnimChannelMatrixXfmTable, AnimChannelScalarTable | |
from panda3d.core import PTA_float | |
class MotionCapture: | |
def __init__(self, actor, part_name="modelRoot", lod_name="lodRoot"): | |
self.part_bundle = actor.get_part_bundle(part_name, lod_name) | |
self.joint_tables = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Takes a .whl file and figures out the top-level importable names in that wheel. | |
Usage: | |
$ python find-top-level-from-wheel-file.py ./setuptools-65.4.1-py3-none-any.whl | |
['_distutils_hack', 'pkg_resources', 'setuptools'] | |
Testing: | |
$ pytest find-top-level-from-wheel-file.py | |
... |
specification:
- php server storing a server.
- the first person opening a file becomes the master and is in charge to save to the server
- all other users open webrtc connection to the master and keep the document in sync with him
- if it makes things easier, only allow one user at a time to edit a block (paragraph, list, section)
todo:
- check if and how to get webrtc to work without a node server.
- try to convert a chat example in a text editor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import os | |
from multiprocessing import Process, Pipe | |
import wx | |
from direct.task import Task | |
from pandac.PandaModules import WindowProperties | |
from pandac.PandaModules import loadPrcFileData | |
from direct.showbase.ShowBase import ShowBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
version="${1:-$(uname -r | cut -d'-' -f1)}" | |
extra="${2:-$(uname -r | cut -d'-' -f2-)}" | |
fullversion="$version-$extra" | |
echo Making patch for kernel $fullversion | |
name="linux-$version" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toUTF8Array(str) { | |
var utf8 = []; | |
for (var i=0; i < str.length; i++) { | |
var charcode = str.charCodeAt(i); | |
if (charcode < 0x80) utf8.push(charcode); | |
else if (charcode < 0x800) { | |
utf8.push(0xc0 | (charcode >> 6), | |
0x80 | (charcode & 0x3f)); | |
} | |
else if (charcode < 0xd800 || charcode >= 0xe000) { |
NewerOlder