Skip to content

Instantly share code, notes, and snippets.

Peeyush Kushwaha peey

  • India
Block or report user

Report or block peey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View distraction-free-stackexchange.js
// ==UserScript==
// @name Hide Hot Network Questions and Hot Meta Posts
// @namespace http://CHANGE.TO.YOUR.WEBPAGE
// @version 0.1
// @description Hide Hot-Network-Questions in StackExchange sites
// @match *://*.stackexchange.com/*
// @match *://*.stackoverflow.com/*
// @match *://*.superuser.com/*
// @match *://*.serverfault.com/*
// @match *://*.askubuntu.com/*
@peey
peey / examples-of-crossbrowser-incompatibility.md
Last active Jan 1, 2019
Browser monculture is bad. And it has real effects
View examples-of-crossbrowser-incompatibility.md
View better-new-twitter.css
/* don't make right sidebar sticky */
[data-testid=sidebarColumn] > div > div:nth-child(2) {
position: absolute;
}
/* dull out the empty space. Hardcoded colors for white theme. */
[data-testid='primaryColumn'] {
background:#e6ecf0;
}
@peey
peey / write-large-file.js
Last active Sep 8, 2019
Writes large files with low memory requirements
View write-large-file.js
var items = 2500000000; // number of lines to write to the file. Currently >20 GB for sequential ints
var buffer_size = 1000000; // amount of items to buffer in memory. Currently ~200 MB for ints
var fs = require('fs')
var buffer = [];
for (var i =0; i < items; i++) {
var data = i; // make it a random integer, or whatever else your heart desires
buffer.push(data);
You can’t perform that action at this time.