Skip to content

Instantly share code, notes, and snippets.

Avatar

Robo deepak1556

  • Microsoft
  • Japan
View GitHub Profile
@bokmann
bokmann / JRuby Awesome Performance
Last active Jul 11, 2021
brief summary of massive performance improvements with JRuby
View JRuby Awesome Performance
# Thee will be more information here when I share the entire problem space I'm working on, but
# in short, this is preview material for my second talk in a series called "What Computer Scientists Know".
# The first talk is on recursion, and goes through several examples., leading up to a problem based
# on a simple puzzle that initial estimates based on performance of a previous puzzle would take years
# to solve on modern computers with the techniques shown in Ruby. That sets the stage for improving the
# performance of that problem with threading, concurrency, and related tuning.
#
# The second talk is on threading and concurrency, touching on algorithmic performance as well.
# Using some knowledge of the problem (board symmetry, illegal moves, etc), we reduce the problem space
# to about .5% of what we initially thought it was. Still, the initial single threaded solution took more
@benjamingr
benjamingr / gist:0237932cee84712951a2
Last active Jun 15, 2021
Promise unhandled rejection tracking global handler hook
View gist:0237932cee84712951a2

Possibly Unhandled Rejection NodeJS Promise Hook

###Unhandled Rejection Tracking

Several promise libraries such as bluebird and when as well as some native promise implementations offer potentially unhandled rejection tracking. This means that the following:

Promise.reject(new Error("err")); // never attach a `catch`
View on_the_viability_of_erlang_releases_and_couchdb.md

On the Viability of Erlang Releases and CouchDB

There has been some discussion on what versions of Erlang CouchDB should support, and what versions of Erlang are detrimental to use. Sadly there were some pretty substantial problems in the R15 line and even parts of R16 that are landmines for CouchDB. This post will describe the current state of things and make some potential recommendations on approach.

Scheduler Collapse

@mathisonian
mathisonian / index.md
Last active Feb 23, 2021
requiring npm modules in the browser console
View index.md

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: https://github.com/mathisonian/requirify/issues/5

inspiration

@joaomoreno
joaomoreno / config.xlaunch
Last active Jan 21, 2021
Selfhosting VS Code on WSL
View config.xlaunch
<?xml version="1.0" encoding="UTF-8"?>
<XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="0" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="True" DisableAC="True" XDMCPTerminate="False"/>
@chrisdone
chrisdone / AnIntro.md
Last active Aug 21, 2020
Statically Typed Lisp
View AnIntro.md

Basic unit type:

λ> replTy "()"
() :: ()

Basic functions:

@addyosmani
addyosmani / notes.md
Last active Mar 22, 2019
Notes on streaming JS & long-term code compilation caching in Chrome
View notes.md

Re: http://blog.chromium.org/2015/03/new-javascript-techniques-for-rapid.html

V8 Optimisations to enable fast page startup

As mentioned in our Chromium blog post, Chrome 41 introduces support for streaming parsing of JavaScript files using the async or defer attributes. This is where the V8 parser will parse any incoming JavaScript piece-by-piece so the compiler can immediately begin compiling the AST when script loading has completed. This lets us do something useful while waiting for the page to load. Compare:

This means parsing can be removed from the critical path when loading up the page. In these cases such scripts are parsed on a separate thread as soon as the download begins, allowing parsing to complete very soon after the download has completed (milliseconds), leading to pages (potentially) loading much faster.

@binarykitchen
binarykitchen / emscripten_avconv_x264_libvpx
Last active Aug 10, 2018
mad goal: port avconv to javascript (part 1 of 2)
View emscripten_avconv_x264_libvpx
first install x264, libvpx and avconv the normal way without emscripten:
0. install common dependencies
> sudo apt-get install build-essential checkinstall build-dep
1. install yasm
> cd [YOUR PROJECTS FOLDER]
> wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
@boopathi
boopathi / attack.go
Last active Dec 19, 2015
A webpage was trying to get users login details of gmail. So I thought I would just play around. Find the url from the code
View attack.go
package main
import (
"fmt"
"net/http"
"net/url"
"time"
)
type A struct {