Skip to content

Instantly share code, notes, and snippets.

View ManasJayanth's full-sized avatar

prometheansacrifice ManasJayanth

View GitHub Profile
@ManasJayanth
ManasJayanth / matrix.html
Created August 31, 2015 05:49
My crappy attempt the matrix screen
<html>
<head>
<style>
html, body {
height: 100%;
width: 100%;
margin: 0;
font-size: 100%;
background-color: #000000;
color: green;
@ManasJayanth
ManasJayanth / extract-domain-from-url.js
Last active December 30, 2015 13:01
RegExp to extract domain from a url
function extractDomain(url) {
return url.match(/(www\.)?([a-z0-9]+\.)+[a-z]{2,}/)[0];
}
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
set-option -g default-command "reattach-to-user-namespace -l bash"
@ManasJayanth
ManasJayanth / canvas-immediate.js
Created April 19, 2017 05:50
Canvas Immediate mode rendering using React
import type { HostConfig, Reconciler } from 'react-fiber-types';
import type { ReactNodeList } from 'react-fiber-types/ReactTypes';
import DOMPropertyOperations from './DOMPropertyOperations';
import type {
Props,
Container,
Instance,
TextInstance,
OpaqueHandle,
@ManasJayanth
ManasJayanth / ReactFiberReconcilerTypes.js
Created December 17, 2017 16:01
ReactFiberReconcilerTypes.js
type Fiber = any;
type ReactNodeList = any;
type ExpirationTime = number;
type Batch = {
_defer: boolean,
_expirationTime: ExpirationTime,
_onComplete: () => mixed,
_next: Batch | null,
};
@ManasJayanth
ManasJayanth / gist:2ae92469a61de70822e3c013453a10bc
Created January 1, 2018 04:59
Prepack output for issue #1303
(function () {
"use strict";
var _$0 = this;
var _2 = function (i) {
return _$0.Math.cos(i * 0.19634954084936207);
};
var _5 = function (value, min, max) {
@ManasJayanth
ManasJayanth / input-issue-1303-prepack.js
Created January 1, 2018 05:02
Prepack issue 1303 - input
this.out = this.out || {};
this.out.js = (function (exports) {
'use strict';
const minMargin = 1;
const sizes = [15, 20, 25 , 50, 40, 130];
const stepPi = (1 / 16) * Math.PI;
// this ensure we go through a wide range of values
@ManasJayanth
ManasJayanth / react-dom-replacement.js
Last active July 12, 2018 14:39
Illustrative light weight react-dom library
import css from 'dom-helpers/style';
import Reconciler from 'react-reconciler';
const isEventRegex = /^on([A-Z][a-zA-Z]+)$/;
const RDL = Reconciler({
getRootHostContext() {
return '';
},
getChildHostContext() {
@ManasJayanth
ManasJayanth / App.js
Created June 22, 2018 03:21
Snippets for Learn you some custom react renderers
import React, { Component } from 'react';
class App extends Component {
constructor() {
super();
this.state = {
count: 0
};
}
render() {
@ManasJayanth
ManasJayanth / my-react-dom-empty.js
Last active June 22, 2018 03:58
Snippets for Learn you some custom react renderers
export default {}