Skip to content

Instantly share code, notes, and snippets.

View hprobotic's full-sized avatar
:dependabot:
On Break

John Pham hprobotic

:dependabot:
On Break
View GitHub Profile
import React from 'react'
import './DashboardView.scss'
export const DashboardView = () => (
<div className="col-md-8 dashboard__main">
<div className="home__activity">
<div className="play-action">
<ul className="li">
<li>
<button className="btn btn-play btn-playnow">
import React, {Component} from 'react'
import { IndexLink, Link } from 'react-router'
import DocumentTitle from 'react-document-title'
import {connect} from 'react-redux'
var showClass
class DashboardView extends React.Component {
componentDidMount() {
let elementWillShow = ['ranking-mode', 'beginner-mode']
for (var item in elementWillShow) {
@hprobotic
hprobotic / socket.js
Last active December 7, 2016 08:11
Socket Handler for Redux and React
//In socket file
const io = require('socket.io-client')
const SOCKET_IO_MESSAGE = 'SOCKET_IO_MESSAGE';
var socket = io('http://localhost:8000/')
export default function attachListener(func) {
//Return a thunk, so that we can access dispatch
return function(dispatch) {
//We're passing dispatch into our listener so that it can dispatch events to redux.
@hprobotic
hprobotic / SelectorViewController.swift
Created December 14, 2016 08:40
File path: Pods/Pods/Eureka/SelectorViewController.swift
// SelectorViewController.swift
// Eureka ( https://github.com/xmartlabs/Eureka )
//
// Copyright (c) 2016 Xmartlabs SRL ( http://xmartlabs.com )
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
import UIKit
public enum Storyboard: String {
case Activity
case Dashboard
case Home
case Discovery
public func instantiate<VC: UIViewController>(_ viewController: VC.Type,
inBundle bundle: Bundle = .framework) -> VC {
@hprobotic
hprobotic / pipe-forward.swift
Created April 20, 2017 11:06
Swift: define F#-style pipe-forward (|>) operator that evaluates from left to right. Raw
/**
Pipe a value into a function.
- parameter x: A value.
- parameter f: A function
- returns: The value from apply `f` to `x`.
*/
public func |> <A, B> (x: A, f: (A) -> B) -> B {
return f(x)
@hprobotic
hprobotic / vim-sc.md
Created June 8, 2017 12:26
Must Know VIM Shortcuts

NERDTree

Files ---
o: open in prev window
go: preview
t: open in new tab
T: open in new tab silently
i: open split
gi: preview split
@hprobotic
hprobotic / download.txt
Last active August 15, 2017 15:48
Clean Coder
Clean Coder:
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_xrw1dovv/v/2/flavorId/0_arddrk3u/fileName/Defects_(HD_1080_-_WEB_(H264_4000)).mp4
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_yzd7x990/v/2/flavorId/0_fk9bn0z5/fileName/Proof_(HD_1080_-_WEB_(H264_4000)).mp4
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_68398vhd/v/2/flavorId/0_a2by6no6/fileName/Productivity_(HD_1080_-_WEB_(H264_4000)).mp4
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_uild2kty/v/2/flavorId/0_xuop6m19/fileName/Life,_The_Universe,_and_Everything:_Part_1_(HD_1080_-_WEB_(H264_4000)).mp4
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_7roooz82/v/2/flavorId/0_rqb92ltf/fileName/Small_Releases_(HD_1080_-_WEB_(H264_4000)).mp4
https://cdnsecakmi.kaltura.com/p/1926081/sp/192608100/serveFlavor/entryId/0_cuj2os6m/v/2/flavorId/0_csl4r53i/fileName/Life,_The_Universe,_and_Everything:_Part_2_(HD_1080_-_WEB_
/*
* The Typekit service used to deliver this font or fonts for use on websites
* is provided by Adobe and is subject to these Terms of Use
* http://www.adobe.com/products/eulas/tou_typekit. For font license
* information, see the list below.
*
* proxima-nova:
* - http://typekit.com/eulas/00000000000000003b9b038f
* - http://typekit.com/eulas/00000000000000003b9b038e
* - http://typekit.com/eulas/00000000000000003b9b0385
vimrc
Loading latest commit…
" map leader \ to , for convinient, use command :echo mapleader to check current leader
let mapleader = ";"
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()