Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am cheungj on github.
  • I am jayjayjay (https://keybase.io/jayjayjay) on keybase.
  • I have a public key ASCqKXZbWfo8dJyi1cEzBOgFHXijaUpuUl0F8DCoxP384Ao

To claim this, I am signing this object:

@CheungJ
CheungJ / invitedAndHaveNotAnsweredCount.js
Created November 18, 2017 11:36
Google App script for Google Sheets
function invitedAndHaveNotAnsweredCount(invitedRange, goingRange) {
if (invitedRange.length !== goingRange.length) {
throw '"invitedRange" and "goingRange" must be the same length.';
}
var count = 0;
for (var i = 0; i < invitedRange.length; i++) {
if (isInvited(invitedRange[i]) && hasNotAnswered(goingRange[i])) {
count++;

Abbreviation: desc

Template text:

describe("$description$", function () {
  it("should $it$", function () {
      $content$
  });
});
@CheungJ
CheungJ / Verdun - Improvements and Bugs.md
Last active September 4, 2016 18:31
I've made this list to track bugs and to suggest areas for improvement in the game Verdun. My aim is to provide constructive feedback from the point of view of a player.

Informational

  • Provide information about the purpose of different classes and how to best use that class.
  • Provide a more detailed tutorial which is like a playable training level. It could have different difficulty levels (basic, intermediate, advanced.

Joining Friends

  • Unable to join friends by sending game invites.

Main Menu

  • Fix menu lag.
Description Command
Forward delete fn + delete
Description Command Shorthand for
Rename branch git branch -m <old-name> <new-name> -
Rename remote branch git push origin :<old-name> <new-name> -
Delete branch git branch -D <branch-name> -
Delete remote branch git push origin --delete <branch-name> -
Squash local commits git rebase -i <branch-name> -
Squash remote commits git rebase -i <origin>/<remote-branch-name>~<num-commits-to-squash> <branch-name> -
Retrieve and merge a remote git pull <origin> <remote-branch-name> git fetch && git merge <origin> <remote-branch-name>
Retrieve and merge a remote (uses a single branch for local and remote branch) git pull --rebase -
@CheungJ
CheungJ / Gruntfile.js
Created May 7, 2016 04:41
Stylelint sample Grunt config
module.exports = function(grunt) {
grunt.initConfig({
postcss: {
lint: {
options: {
map: false,
processors: [
require( 'stylelint' )(require
('./.stylelintrc.json'))
English French Pronunciation
below en bas on bah
above en haut on oh
left á gauche -
right á droit -
behind you derriere toi -
kitchen cuisine -
stairs escaliers -

#CSS

Regex Replace Purpose Example
([^\s])\{$ $1 { Rules which don't have a space between the rule name and opening brace .my-class-name{
:([^\s]) : $1 No space between key and value .my-class-name { key:value }
<h3><a style="color: #ff0062; text-decoration: none; background: white;" href="https://jsoncheung.com/blog/london/november-2015-april-2016/">Nov 2015 – Apr 2016</a></h3>