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 is a Node+WebSocket powered demo to sync videos | |
across different browsers. This file is the client, | |
the other one is the Node server. Powered by Node and | |
http://github.com/miksago/node-websocket-server --> | |
<style> | |
.inactive { display: none; } | |
.active { display: block; } | |
</style> | |
<script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Username to UUID</title> | |
<?php | |
function getUUID($users,$agent) { | |
$data = array(); | |
foreach ($users as $key => $value) { | |
array_push($data, $value); | |
} |
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
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo | |
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps | |
# The below command seems to fix the problem | |
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local | |
# The above command is a bit complicated, but all it's doing is copying whatever version of node | |
# you have active via nvm into the /usr/local/ directory (where user installed global files should | |
# live on a linux VPS) and setting the permissions so that all users can access them. |
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
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
Excited, the new apprentice jumped right into his Master’s training server.
The apprentice asked, “Master what files should I backup?”
The Master replied, “Does not the mother bird care for all her fledglings? Will not the shepherd watch over his entire flock? Therefore, one must backup all files in one’s care, no matter how small or insignificant we consider them to be. Each file has its importance and must not be overlooked.”
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
// ==================== Ascii Art ==================== | |
echo "$$$$$$$\ $$$$$$$$\ $$\ $$$$$$\ $$\ $$\ $$$$$$\ $$$$$$$$\ $$$$$$\ $$$$$$$\ $$\ $$\ $$$$$$$$\ " | |
echo "$$ __$$\ $$ _____|$$ | \_$$ _|$$ | $$ |$$ __$$\\__$$ __|$$ __$$\ $$ __$$\ $$$\ $$$ |$$ _____|" | |
echo "$$ | $$ |$$ | $$ | $$ | $$ | $$ |$$ / $$ | $$ | $$ / $$ |$$ | $$ | $$$$\ $$$$ |$$ | " | |
echo "$$ | $$ |$$$$$\ $$ | $$ | \$$\ $$ |$$$$$$$$ | $$ | $$ | $$ |$$$$$$$ | $$\$$\$$ $$ |$$$$$\ " | |
echo "$$ | $$ |$$ __| $$ | $$ | \$$\$$ / $$ __$$ | $$ | $$ | $$ |$$ __$$< $$ \$$$ $$ |$$ __| " | |
echo "$$ | $$ |$$ | $$ | $$ | \$$$ / $$ | $$ | $$ | $$ | $$ |$$ | $$ | $$ |\$ /$$ |$$ | " | |
echo "$$$$$$$ |$$$$$$$$\ $$$$$$$$\ $$$$$$\ \$ / $$ | $$ | $$ | $$$$$$ |$$ | $$ |$$\ $$ | \_/ $$ |$$$$$$$$\ " | |
echo "\_______/ \________|\________|\______| \_/ \__| \__| \__| \______/ \__| \__|\__|\__| \ |
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
# convert video to animated .gif | |
# requires FFmpeg 2.6 or higher | |
# http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
param( | |
[Parameter(Mandatory=$true)][string]$InputPath, | |
[string]$OutputPath, | |
[int]$Height=0 # 0 for input height | |
) |
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
/* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger(); |
Thanks to /u/zpoo32 for reporting several issues in this list!
- deemix: just the cli and the library
- deemix-pyweb: the app with a GUI
- deemix-server: just the server part of deemix-pyweb
OlderNewer