Skip to content

Instantly share code, notes, and snippets.

View fijiwebdesign's full-sized avatar

Gabirieli Lalasava fijiwebdesign

View GitHub Profile
@fijiwebdesign
fijiwebdesign / torcdn-embed-broadcaster.html
Last active December 24, 2017 06:08
TorCDN embed code for broadcasting video
<!--
Usage:
Replace the {uid} with a unique ID for this broadcaster.
Make sure the uid is unique.
An example UID in JavaScript:
var uid = parseInt(Math.ceil(Math.random()*Math.pow(10, 20))).toString(36)
@fijiwebdesign
fijiwebdesign / torcdn-embed-static-video.html
Last active December 24, 2017 06:08
TorCDN Embed code for static video streaming
<!--
Usage:
Replace the {url} with the URL of the video file.
Example:
video url: https://player.vimeo.com/external/135736646.hd.mp4?s=ed02d71c92dd0df7d1110045e6eb65a6&profile_id=119
@fijiwebdesign
fijiwebdesign / torcdn-video-stream-torrent-file-embed.html
Last active December 24, 2017 06:09
Embed code for TorCND video player using .torrent file
<!--
Torrent Video:
Torrent: Cosmos Laundromat [2015]
Publisher: Blender.org
Publisher Page: https://www.blender.org/features/projects/
Torrent Info Page: https://monova.org/4833706BFB18BB2AA7B43D77D774F05642A27CE4
Magnet: magnet:?xt=urn:btih:4833706bfb18bb2aa7b43d77d774f05642a27ce4
InfoHash: 4833706BFB18BB2AA7B43D77D774F05642A27CE4
@fijiwebdesign
fijiwebdesign / torcdn-player-infohash.html
Last active December 24, 2017 06:03
Embed code for TorCDN Player using Torrent InfoHash
<!--
Torrent Video:
Torrent: Cosmos Laundromat [2015]
Publisher: Blender.org
Publisher Page: https://www.blender.org/features/projects/
Torrent Info Page: https://monova.org/4833706BFB18BB2AA7B43D77D774F05642A27CE4
Magnet: magnet:?xt=urn:btih:4833706bfb18bb2aa7b43d77d774f05642a27ce4
@fijiwebdesign
fijiwebdesign / video-stream-torrent-magnet-embed.html
Last active December 24, 2017 06:10
TorCDN video HTML embed codes
<!--
Torrent Video:
Torrent: Cosmos Laundromat [2015]
Publisher: Blender.org
Publisher Page: https://www.blender.org/features/projects/
Torrent Info Page: https://monova.org/4833706BFB18BB2AA7B43D77D774F05642A27CE4
Magnet: magnet:?xt=urn:btih:4833706bfb18bb2aa7b43d77d774f05642a27ce4
@fijiwebdesign
fijiwebdesign / netcat-proxy.sh
Created September 12, 2017 08:29
Netcat intercepting proxy
# https://blog.hawkhost.com/2009/12/12/using-netcat-as-an-intercepting-proxy/
# http://noah.org/wiki/TCP_proxy_with_netcat
nc -l -p 12345 < pipe | tee outgoing.log | nc irc.freenode.net 6667 | tee pipe incoming.log
@fijiwebdesign
fijiwebdesign / terminal-watch-notify-mac.sh
Created September 12, 2017 07:38
Watch and notify in terminal
# Make sure you have volume on your mac
# an ANSWER for DNS A record has resolved for example.com
watch 'dig A example.com | grep ANSWER | [[ ! -z $(cat /dev/stdin) ]] && say "DNS has resolved"'
# an ANSWER for DNS A record has resolved to IP 93.184.216.34
watch 'dig A example.com | grep 93.184.216.34 | [[ ! -z $(cat /dev/stdin) ]] && say "DNS has resolved"'
@fijiwebdesign
fijiwebdesign / .bash_profile
Created April 21, 2017 11:59
.bash_profile
# working on
# cd ~/www/factmata
# chrome shortcuts
function chrome() { open /Applications/Google\ Chrome.app/ "$*"; }
function google() { open /Applications/Google\ Chrome.app/ "http://www.google.com/search?q=$*"; }
# tab status
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
@fijiwebdesign
fijiwebdesign / array-unique.js
Created February 20, 2017 16:38
Unique array in Javascript
// ES5
function arrUnique(arr) {
return arr.filter( function(value, index) {
return arr.indexOf(value) == index
})
}
// ES6
const arrUnique = arr =>
arr.filter( (value, index) => arr.indexOf(value) == index )
@fijiwebdesign
fijiwebdesign / index.html
Last active February 12, 2017 09:58
Shared WebWorker Example
<script>
var url = 'shared-webworker.js';
var worker = new SharedWorker(url);
console.log('Using shared worker at', url)
worker.port.addEventListener("message", function(e) {
alert(e.data);
}, false);