Skip to content

Instantly share code, notes, and snippets.

View MForMarlon's full-sized avatar
🎹
or ⌨️ or 😮 or 😴

Marlon Evangelista MForMarlon

🎹
or ⌨️ or 😮 or 😴
View GitHub Profile
@francisrstokes
francisrstokes / StateDispatcher.js
Last active November 10, 2024 13:37
Redux without redux - sharing state and one way data flow using only standard react
import React from 'react';
export class StateDispatcher extends React.Component {
constructor(props) {
super(props);
this.state = props.state || {};
this._dispatch = this.dispatch.bind(this);
}
dispatch(action) {
@alesolano
alesolano / algorithms_openpose.md
Last active August 26, 2021 19:47
OpenPose TensorFlow Alogrithms
@Alek-S
Alek-S / tmux_commands.md
Last active September 11, 2019 00:22
tmux Commands

Start new named session:

tmux new -s [session name]

Detach from session:

ctrl+b d

List sessions:

tmux ls

Attach to named session:

@superKalo
superKalo / Sortable.jsx
Last active August 9, 2022 09:31
How to use jQuery UI with React JS? You can use this approach to integrate almost any jQuery plugin! Full details and explanation here: http://stackoverflow.com/a/40350880/1333836
class Sortable extends React.Component {
componentDidMount() {
// Every React component has a function that exposes the
// underlying DOM node that it is wrapping. We can use that
// DOM node, pass it to jQuery and initialize the plugin.
// You'll find that many jQuery plugins follow this same pattern
// and you'll be able to pass the component DOM node to jQuery
// and call the plugin function.
@rlcarrca
rlcarrca / new_task.py
Created April 16, 2016 20:29
Multiprocessing sample with RabbitMQ
#!/usr/bin/env python
import sys
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(
'localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello', durable=True)
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active November 4, 2024 04:14
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@staltz
staltz / introrx.md
Last active November 19, 2024 18:00
The introduction to Reactive Programming you've been missing
@DennyLoko
DennyLoko / numberFormatHelper.js
Last active August 14, 2024 14:19
numberFormat Handlebars helper
/**
* An Handlebars helper to format numbers
*
* This helper have these three optional parameters:
* @var decimalLength int The length of the decimals
* @var thousandsSep char The thousands separator
* @var decimalSep char The decimals separator
*
* Based on:
* - mu is too short: http://stackoverflow.com/a/14493552/369867