Skip to content

Instantly share code, notes, and snippets.

View brijeshb42's full-sized avatar
🏠
Working from home

Brijesh Bittu brijeshb42

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>VSCode</title>
<style type="text/css">
html {
height: 100%;
width: 100%;
}
</style>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta name="description" content="If you want to edit something of the product, do it here."/>
<link rel="shortcut icon" href="favicon.ico" />
<title>Edit Product</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
@brijeshb42
brijeshb42 / Makefile
Created May 28, 2018 06:41
Test Makefile
CC=gcc
OPTIMIZATION?=-O2
NODEPS:=clean
DEPENDENCY_TARGETS=libll libwebsockets
STD=-std=c99 -pedantic
WARN=-Wall -W -Wno-missing-field-initializers
OPT=$(OPTIMIZATION)
PREFIX?=..
@brijeshb42
brijeshb42 / forwarder.py
Created May 11, 2018 18:44 — forked from abhinavsingh/forwarder.py
Tornado websockets and ZMQ pubsub
import zmq
def main():
try:
context = zmq.Context(1)
frontend = context.socket(zmq.SUB)
frontend.bind('tcp://*:5559')
frontend.setsockopt(zmq.SUBSCRIBE, '')
04de33ce6a87893d507c107a18976e018205cb95749b20f2edf3df388ef37f43971dd2066a412f6e01bab5f77a91ddab6a25a92edb14f8e2aba46255ccf501d401
// declare functions for all the different types of embeds as shown previously
const Types = {
youtube,
vimeo,
vine,
twitter,
facebook,
instagram,
iframe
<figure
data-embed-type="facebook"
data-embed-url="https://www.facebook.com/scroll.in/videos/1289835134432697/"
data-embed-loaded="false">
<div
class="fb-video"
data-href="https://www.facebook.com/scroll.in/videos/1289835134432697/"
data-allowfullscreen="true"
data-width="auto">
</div>
let youtubeLoaded = '';
// Keeps track of if the iframe_api has been loaded or not or if there was any error.
// In case of error, we fall back to rendering iframes directly
function onYouTubeIframeAPIReady () {
youtubeLoaded = 'loaded';
}
// Start playing the youtube video on desktops because the click came from our own orange
@brijeshb42
brijeshb42 / youtube.html
Created February 14, 2017 12:41
Rendered
<figure
data-iframe="<iframe width=&quot;480&quot; height=&quot;270&quot; src=&quot;https://www.youtube.com/embed/QigIssNSOww?feature=oembed&quot; frameborder=&quot;0&quot; allowfullscreen></iframe>"
data-embed-type="youtube"
data-thumbnail="https://i.ytimg.com/vi/QigIssNSOww/hqdefault.jpg"
data-embed-id="QigIssNSOww"
data-embed-loaded="true"
data-height="270"
data-width="480">
<div class="static-wrapper">
<div class="thumbnail-wrapper" style="background-image: url('https://i.ytimg.com/vi/QigIssNSOww/hqdefault.jpg')"></div>
<!-- FB Post: https://www.facebook.com/scroll.in/posts/1295450983871112 -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.5";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div