Skip to content

Instantly share code, notes, and snippets.

View msssk's full-sized avatar

Mangala Khalsa msssk

View GitHub Profile
if (process.platform === 'win32') {
var readline = require('readline');
var readlineInterface = readline.createInterface({
input: process.stdin,
output: process.stdout
});
readlineInterface.on('SIGINT', function () {
process.emit('SIGINT');
});
}
@msssk
msssk / vito-stylus-dark.css
Created May 22, 2020 18:14
HalfStack Online May 2020 dark theme for Stylus
.bg-white {
background-color: #252f3f;
}
.community-feed {
background-color: #374151;
}
body,
.community-menu {
{
"React Native Web widget": {
"scope": "typescriptreact",
"prefix": "rn-widget",
"description": "RNW widget with standard imports and props",
"body": [
"import * as React from 'react';",
"import { Component } from 'react';",
"import { View } from 'react-native';",
"import { styles } from './$TM_FILENAME_BASE.styles';",
@msssk
msssk / github-emoji.md
Created February 24, 2018 01:58
Some nifty GitHub emoji

⭐ ❗ ❕ ❓ ❔ 💩 ✋ 💬 👀 :octocat:

@msssk
msssk / 1351-scroll.html
Created February 9, 2017 16:50
dgrid scroll test
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>dgrid scroll test</title>
<link rel="stylesheet" href="dgrid/css/dgrid.css">
</head>
<body>
<div id="grid"></div>
@msssk
msssk / store-immutable.js
Created May 31, 2016 16:47
store with Immutable
define([
'immutable/immutable',
], function (immutable) {
var MemoryStore = function MemoryStore () {
this.constructor.apply(this, arguments);
};
MemoryStore.prototype = {
constructor: function (options) {
options = options || {};
@msssk
msssk / throttleBoss.js
Last active May 20, 2022 16:58
Throttle with trailing call preservation
// This is a typical throttle implementation with the difference that it doesn't discard
// the final invocation - instead it runs it at the next valid timeslice.
throttleBoss: function(callback, delay) {
var ready = true,
args = null;
return function throttled() {
var context = this;
@msssk
msssk / es5 accessors with declare.js
Last active August 29, 2015 14:25
Adding ES5 accessors to a declared class
var MyGrid = declare([OnDemandGrid, Selector]);
Object.defineProperty(MyGrid.prototype, {
collection: {
get: function () {
return this._collection;
},
set: function (value) {
this._collection = value;
}
}
@msssk
msssk / cldr.html
Created July 11, 2015 17:36
Loading cldrjs with Dojo 1 and Dojo 2
<!DOCTYPE HTML>
<html>
<body>
<script>
var dojoConfig = {
baseUrl: 'dojo2'
};
</script>
<!-- - ->