Skip to content

Instantly share code, notes, and snippets.

View ktpm489's full-sized avatar
🎯
Focusing

ktpm489

🎯
Focusing
View GitHub Profile
@ktpm489
ktpm489 / bash-cheatsheet.sh
Created March 20, 2018 17:28 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ktpm489
ktpm489 / INSTALL.md
Created March 20, 2018 17:30 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@ktpm489
ktpm489 / ES2015In20Minutes.js
Created March 20, 2018 17:30 — forked from danilosilvadev/ES2015In20Minutes.js
A quick guide to reference the ES06
//This gist is a fast reference to ES06 to whose already knows es05.
//I'm trying to use a different approach: first the example and after the explanation.
//Lesson 1: Template literals
console.log(`hello ${firstname},
how are you?`);
//Template literals are string literals with support for interpolation(using ${variable}) and multiple lines.
@ktpm489
ktpm489 / The Technical Interview Cheat Sheet.md
Created March 20, 2018 17:30 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ktpm489
ktpm489 / socket-cheatsheet.js
Created May 11, 2018 17:05 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
@ktpm489
ktpm489 / on-jsx.markdown
Created May 16, 2018 04:51 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@ktpm489
ktpm489 / gist:9f1b6c2c3f39a4aa26e7519b0ff3a3f9
Created May 29, 2018 15:15 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@ktpm489
ktpm489 / rn_cli_commands.sh
Created May 29, 2018 15:25 — forked from JJMoon/rn_cli_commands.sh
React Native Dev commands
# run on other port
react-native start --port 8085
npm start -- --port=8080
@ktpm489
ktpm489 / rn-cli.config.js
Created May 29, 2018 15:26 — forked from miklschmidt/rn-cli.config.js
React Native typescript configuration
var path = require('path');
module.exports = {
getAssetExts() {
return [
'ts',
'tsx'
]
},
getTransformModulePath() {
return path.join(__dirname, 'transformer.js');

Setting up react native test environment.

install React Native on global

npm install react-native-cli -g

create the project

react-native init <ProjectName>

npm install --save enzyme react-dom enzyme-adapter-react-16