Skip to content

Instantly share code, notes, and snippets.

@tanmancan
tanmancan / README.md
Created January 30, 2020 16:27 — forked from nikcub/README.md
Facebook PHP Source Code from August 2007
@tanmancan
tanmancan / github-pr-filter.js
Created December 30, 2019 18:45
Filter Github code review files by path
const path = 'my/file/path';
const files = document.querySelectorAll(`div.file-header[data-path*="${path}"]`);
[...files].forEach(el => {
el.parentNode.style.display = 'none';
});
@tanmancan
tanmancan / regex-search.js
Created October 22, 2019 21:51
Free search using .match()
unmappedListings() {
return this.listings
.filter(listing => !listing.node.abbListingID)
.filter((listing) => {
if (this.search) {
const searchTerm = this.search.trim()
.toLowerCase()
.split(' ')
.join('|');
@tanmancan
tanmancan / tmux-cheatsheet.markdown
Created February 28, 2019 15:02 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tanmancan
tanmancan / tmux_commands.md
Created February 27, 2019 12:57 — forked from Alek-S/tmux_commands.md
tmux Commands

Start new named session:

tmux new -s [session name]

Detach from session:

ctrl+b d

List sessions:

tmux ls

Attach to named session:

@tanmancan
tanmancan / tmux-ngrok.md
Created August 27, 2018 13:23 — forked from keithpitty/tmux-ngrok.md
Pairing with tmux and ngrok

Steps for Remote Pairing using tmux and ngrok

The following steps facilitate remote pairing using:

  • tmux which allows terminal sessions to be attached to different terminals, and
  • ngrok which provides secure tunnels to your localhost

1. Install tmux

OS X: brew install tmux

@tanmancan
tanmancan / bind-call-apply-demo.js
Last active January 17, 2017 13:07
bind, call, apply demo
function nonbinded(para, para2, para3) {
console.log('this:', this);
console.log('para:', para, para2, para3);
}
console.log('Call,Appy,Bind ==============');
console.log('nonbinded()----------------');
nonbinded('test-para', 'test-para2', 'test-para3');
@tanmancan
tanmancan / collapse.css
Created March 24, 2016 15:17
Collapse mixin
.column-left-no-important {
padding-left: 0 ; }
.column-left-important {
padding-left: 0 !important; }
.column-no-important {
padding-left: 0 ;
padding-right: 0 ; }
@tanmancan
tanmancan / date.js
Last active September 11, 2015 17:55
Auto Date
<script>document.write(new Date().getFullYear());</script>
@tanmancan
tanmancan / Gruntfile.js
Last active August 29, 2015 14:19
Starter grunt tasks and plugins
module.exports = function(grunt) {
// Auto load plugins
require('load-grunt-tasks')(grunt);
// Project configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Javascript linter