Skip to content

Instantly share code, notes, and snippets.

@jaydenlin
jaydenlin / js-set-referrer.js
Created May 1, 2018 15:16 — forked from drewsberry/js-set-referrer.js
Set referrer header in JS.
// See https://stackoverflow.com/a/23434948
function setReferrerHeader(referrerName) {
Object.defineProperty(document, "referrer", {
get: function () { return referrerName; },
});
}
@jaydenlin
jaydenlin / BookingForm.js
Created March 9, 2018 09:49 — forked from rockchalkwushock/BookingForm.js
Using redux-form with next.js
import React, { Component } from 'react'
import { Field, reduxForm } from 'redux-form'
import PropType from 'prop-types'
import { messages } from '../../lib' // ignore pertains to `react-intl`
import validate from './validate'
import Input from './Input'
import TextArea from './TextArea'
class BookingForm extends Component {
@jaydenlin
jaydenlin / README.md
Created February 20, 2018 09:24 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@jaydenlin
jaydenlin / Application.java
Created December 1, 2017 10:41 — forked from pradp/Application.java
Spring boot application class to exclude the data source auto configuration
@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class,
HibernateJpaAutoConfiguration.class,
DataSourceTransactionManagerAutoConfiguration.class })
@Configuration
@ComponentScan(basePackages = { "com.emc.tes" })
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jaydenlin
jaydenlin / tmux.md
Created June 27, 2016 15:26 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@jaydenlin
jaydenlin / install-tmux
Last active June 27, 2016 16:09 — forked from rothgar/install-tmux
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@jaydenlin
jaydenlin / 0_reuse_code.js
Created August 25, 2014 02:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<script type="text/ng-template" id="one.html">
<div>This is first template</div>
</script>
<script type="text/ng-template" id="two.html">
<div>This is second template</div>
</script>