Skip to content

Instantly share code, notes, and snippets.

View dominicgan's full-sized avatar

Dominic Gan dominicgan

View GitHub Profile
@mars
mars / create-react-app-on-heroku.sh
Created July 29, 2016 01:12
Create a React app & deploy to Heroku
## Global install of the app generator
npm install -g create-react-app
## Setup the app (first-time only)
create-react-app my-app
cd my-app
git init
# Create the Heroku app; requires free account at https://www.heroku.com/
heroku create -b https://github.com/heroku/heroku-buildpack-static.git
@zulhfreelancer
zulhfreelancer / exclude_regex.md
Last active August 21, 2023 10:12
Chrome console: How to filter exclude certain logs?

Use this:

^((?![INSERT YOUR WORD THAT YOU WANT TO EXCLUDE HERE]).)*$

Don't forget to check the Regex checkbox!

Example:

I'm excluding logs that contains Pusher words here. So, this is what I put inside the filter box: ^((?!pusher).)*$

@john-science
john-science / smallest_lenses_for_sony_a7.md
Last active August 27, 2019 15:06
The smallest lenses adaptable to the Sony a7 (series)

Smallest Lenses Adaptable to the Sony a7

This has been moved to a blog post.

@neilcarpenter
neilcarpenter / gist:8979ea9ed91b10e36af9
Created March 5, 2015 11:03
Enable Emmet in .JSX files, using Babel JSX Syntax highlighter
// add to Preferences > Key Bindings - User
// see http://stackoverflow.com/a/26619524 for context
{ "keys": ["tab"], "command": "expand_abbreviation_by_tab",
"context": [
{
"operand": "source.js",
"operator": "equal",
"match_all": true,
"key": "selector"
@jackyliang
jackyliang / Baidu Maps API
Last active September 9, 2021 07:17
Baidu Maps API
Baidu Maps API Detailed Explanation
-
Explanation of [drawing Objects onto Baidu Maps](http://developer.baidu.com/map/jsdemo.htm#f0_7).
Draw Shit Onto Baidu Map:
-
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@jarrodirwin
jarrodirwin / storagePolyfill.js
Last active May 23, 2024 14:23 — forked from remy/gist:350433
LocalStorage/SessionStorage Polyfill with Safari Private Browsing support.
// Refer to https://gist.github.com/remy/350433
try {
// Test webstorage existence.
if (!window.localStorage || !window.sessionStorage) throw "exception";
// Test webstorage accessibility - Needed for Safari private browsing.
localStorage.setItem('storage_test', 1);
localStorage.removeItem('storage_test');
} catch(e) {
(function () {
var Storage = function (type) {
@magicznyleszek
magicznyleszek / jekyll-and-liquid.md
Last active January 12, 2024 03:46
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

@joshrieken
joshrieken / locomotive_wordpress.md
Last active September 5, 2019 10:03
A comparison of Rails+LocomotiveCMS vs. Wordpress for small business CMS sites.

Wordpress (PHP-based CMS [content management system])

Pros

Quick bootup

You can get up and running very quickly.

Hosting options

@desandro
desandro / jquery-layout-review.md
Created January 28, 2013 18:13
layout thrashing in jQuery
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 27, 2024 16:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname