Skip to content

Instantly share code, notes, and snippets.


Jeong Seong Dae jeongsd

View GitHub Profile
sloanwolf / ReactNativeChatScreenExample.js
Last active Oct 13, 2022
React-Native Chat screen with bottom TextInput
View ReactNativeChatScreenExample.js
* Below is a bare functioning example of how I made a React-Native Chat messaging component that shifts the input up when
* the keyboard is active, and scrolls back down when the keyboard is inactive from a TextInput blur.
* The only thing I haven't been able to figure out yet is getting the ListView to render from the bottom, not sure if it's
* possible yet via styles.
* NOTE: This uses from iOS-only properties
View Using Github Deploy

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
chrissimpkins / gist:5bf5686bae86b8129bee
Last active Jan 31, 2023
Atom Editor Cheat Sheet: macOS
View gist:5bf5686bae86b8129bee

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
sebmarkbage / Enhance.js
Last active Sep 19, 2022
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
componentDidMount() {
this.setState({ data: 'Hello' });
render() {
Schniz / async-route.js
Last active Aug 25, 2016
Async react router component for using webpack chunks like Instagram guys do. work in progress.
View async-route.js
/** @jsx React.DOM */
var React = require('react');
var handlers = {};
var AsyncRoute = function(req) {
return React.createClass({
getInitialState: function() {
return {
myComponent: handlers[req]
View gist:598fa75e22bdfa44cf47

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

gaearon / createAsyncPage.jsx
Last active Mar 23, 2018
Webpack's async code splitting with React Router
View createAsyncPage.jsx
'use strict';
var React = require('react');
function createAsyncHandler(getHandlerAsync, displayName) {
var Handler = null;
return React.createClass({
displayName: displayName,
madhums / base64-image-upload.js
Created Sep 14, 2014
save base64 encoded image
View base64-image-upload.js
* Taken from
var fs = require('fs');
// string generated by canvas.toDataURL()
var img = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0"
+ "3gAAAABJRU5ErkJggg==";
// strip off the data: url prefix to get just the base64-encoded bytes

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);