We have very precise rules over how our Git commit messages must be formatted. This format leads to easier to read commit history.
Each commit message consists of a header, a body, and a footer.
<header>
// use (16 chars of) 'password' to encrypt 'plaintext' | |
function encrypt(plaintext, password) { | |
var v = new Array(2), k = new Array(4), s = "", i; | |
plaintext = escape(plaintext); // use escape() so only have single-byte chars to encode | |
// build key directly from 1st 16 chars of password | |
for (var i=0; i<4; i++) k[i] = Str4ToLong(password.slice(i*4,(i+1)*4)); |
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
function rc4(key, str) { | |
var s = [], j = 0, x, res = ''; |
/* | |
* RC4 symmetric cipher encryption/decryption | |
* | |
* @license Public Domain | |
* @param string key - secret key for encryption/decryption | |
* @param string str - string to be encrypted/decrypted | |
* @return string | |
*/ | |
function rc4(key, str) { | |
var s = [], j = 0, x, res = ''; |
const Cont = require('./lazy-continuation'); | |
// pointed version | |
const c = Cont.of(5) // initial value | |
.chain((x) => { | |
return Cont.of(x + 5); // synchronous computation | |
}) | |
.chain((x) => { // async computation | |
return new Cont((resolve) => { | |
setTimeout(() => resolve(x + 15), 500); |
/* | |
* Reference: | |
* http://www.quora.com/Computer-Programming/What-are-some-cool-bit-manipulation-tricks-hacks | |
* http://www.catonmat.net/blog/low-level-bit-hacks-you-absolutely-must-know/ | |
*/ | |
#include <iostream> | |
#include <string.h> | |
using namespace std; |
document.oncontextmenu = function(event) { | |
event.preventDefault(); | |
event.stopPropagation(); | |
return false; | |
}; | |
document.addEventListener('contextmenu', function(event){ | |
event.preventDefault(); | |
event.stopPropagation(); |
import React, { useState } from "react"; | |
import ReactDOM from "react-dom"; | |
const style = { | |
table: { | |
borderCollapse: "collapse", | |
}, | |
tableCell: { | |
border: "1px solid gray", | |
margin: 0, |
about:config
in address bar and press enter.xpinstall.signatures.required
and double click to disablenpm init
.