Skip to content

Instantly share code, notes, and snippets.

View MrDHat's full-sized avatar
🍟

Akshay Katyal MrDHat

🍟
View GitHub Profile

ETags: a pretty sweet feature of HTTP 1.1

HTTP caching review

HTTP provides two ways for servers to control client-side caching of page components:

  • freshness may be based on a date or a token whose meaning is app-specific
  • whether or not the client needs to confirm the cached version is up-to-date with the server

This breaks down as follows:

  • Cache locally and don't check before using.

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
function inherit(proto, literal) {
var result = Object.create(proto);
for (var prop in literal) {
if (literal.hasOwnProperty(prop)) {
result[prop] = literal[prop];
}
}
return result;
}

B2G Quickstart for Payments and Identity

Before you begin: You want to do this on a Mac. I have been using Linux for months, and unresolved redraw issues (white screen of death) are killing me. Mac works great. Use OSX.

This sets you up to make two separate targets:

  • One for a desktop [simulator] [1]
  • One for the Unagi [device] [2]

These are the moving parts:

  • [mozilla-inbound repo] [3] clone (hg)

Preferences

{
	"caret_style": "phase",
	"dictionary": "Packages/Language - English/en_US.dic",
	"draw_white_space": "selection",
	"font-size": 12.0,
	"highlight_line": true,
	"ignored_packages":
var mongoose = require('mongoose');
var glob = require("glob");
var path = require('path');
mongoose.connect('mongodb://username:password@localhost/dbname');
/**
* We check if the connection is ok
@MrDHat
MrDHat / kerberos_setup.md
Created August 29, 2017 09:36 — forked from ashrithr/kerberos_setup.md
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in