Skip to content

Instantly share code, notes, and snippets.

@pathtolearn
pathtolearn / 0_reuse_code.js
Created September 4, 2017 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/* Bootstrap 4 Beta 3 - https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css */
.active
.alert
.alert-danger
.alert-dark
.alert-dismissible
.alert-heading
.alert-info
.alert-light
@pathtolearn
pathtolearn / hidden-classes-in-js-and-inline-caching.md
Created March 16, 2018 12:12 — forked from twokul/hidden-classes-in-js-and-inline-caching.md
Hidden classes in JavaScript and Inline Caching

Hidden classes in JavaScript and Inline Caching

Knowing how internals work is always a good. Pretty much for everything. Cars, trains, computers, you name it. It gives you an insight on what happens under the hood. You also act/react differently based on this knowledge.

As you might have guessed, it’s also true for web development. Knowledge of CSS transitions allows you to achieve better performance and not to use JavaScript in most cases. Knowledge of V8 internals allows you to write more performant JavaScript code. So let’s talk about V8 a little.

A little about V8

V8 is a JavaScript engine built by Google. Firefox built SpiderMonkey, Opera built Carakan and Microsoft built Chakra. One very important difference between V8 and other JavaScript engines is that V8 doesn’t generate any intermediate code. It compiles JavaScr

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
link : https://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version
/**
* Mark and Sweep Garbage Collection technique.
* MIT Style License
* by Dmitry Soshnikov
*/
// This diff describes the simplest version of mark and sweep
// GC in order to understand the basic idea. In real practice the
// implementation can be much tricker and optimized.
@pathtolearn
pathtolearn / README.md
Created April 29, 2018 13:27 — forked from alienlebarge/README.md
Setting proxy with node.js

Node.js behind a proxy

Write proxy settings

$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128

This config is great for SquidMan app.

@pathtolearn
pathtolearn / .htaccess
Created September 23, 2018 13:43 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for an Angular 5 App in production
# place this file in the same folder as your index.html on your server
# make sure to set the right base href attribute in your index.html
# this file ist hosted on GithubGist:
# https://gist.github.com/julianpoemp/bcf277cb56d2420cc53ec630a04a3566
# REDIRECTION
# to index.html to make routing work in production
<IfModule mod_rewrite.c>
RewriteEngine on
@pathtolearn
pathtolearn / base64.js
Created April 15, 2020 07:13 — forked from enepomnyaschih/base64.js
https://www.npmjs.com/package/byte-base64 - Encode JS Uint8Array, simple array of bytes or native JS string to base64 and back
/*
MIT License
Copyright (c) 2020 Egor Nepomnyaschih
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
Sample .NET Core + Npgsql for RC2
1] Project.json
{
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Npgsql": "3.1.0"