Skip to content

Instantly share code, notes, and snippets.

@productinfo
productinfo / hidden-classes-in-js-and-inline-caching.md
Created February 5, 2020 19:57 — 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

@productinfo
productinfo / private_fork.md
Created November 16, 2019 00:15 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@productinfo
productinfo / serverless.yml
Last active October 13, 2019 15:39 — forked from frankzickert/serverless.yml
deploy serverless express app as AWS lamda function
service:
name: soa-example
plugins:
- serverless-offline
- serverless-pseudo-parameters
# the custom section
custom:
stage: ${self:provider.stage, env:STAGE, 'dev'}
@productinfo
productinfo / NotesApp.swift
Created July 2, 2019 21:06 — forked from jnewc/NotesApp.swift
A notes app written in >100 lines of swift using SwiftUI
//
// ContentView.swift
// Listomania
//
// Created by Jack Newcombe on 05/06/2019.
// Copyright © 2019 Jack Newcombe. All rights reserved.
//
import SwiftUI
import SwiftUI
import Combine
class MyDatabase: BindableObject {
let didChange = PassthroughSubject<MyDatabase, Never>()
var contacts: [Contact] = [
Contact(id: 1, name: "Anna"), Contact(id: 2, name: "Beto"),
Contact(id: 3, name: "Jack"), Contact(id: 4, name: "Sam")
] {
@productinfo
productinfo / info.plist
Created June 11, 2016 10:03 — forked from mlynch/info.plist
Disable App Transport Security in iOS 9
<!--
This disables app transport security and allows non-HTTPS requests.
Note: it is not recommended to use non-HTTPS requests for sensitive data. A better
approach is to fix the non-secure resources. However, this patch will work in a pinch.
To apply the fix in your Ionic/Cordova app, edit the file located here:
platforms/ios/MyApp/MyApp-Info.plist
And add this XML right before the end of the file inside of the last </dict> entry:
@productinfo
productinfo / gist:633705c56bee8e5b4c830ef6e8059881
Created June 9, 2016 04:24 — forked from yoitsro/gist:8693021
Node + Restify + Passport + Sessions + WebSockets
var restify = require('restify');
// Authentication
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var sessions = require("client-sessions");
var server = restify.createServer();
server.use(restify.queryParser());
server.use(restify.bodyParser());
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');