Skip to content

Instantly share code, notes, and snippets.

@rightson
rightson / simple-server.py
Last active April 22, 2018 12:05
simple flask
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/store' , methods=['POST'])
def create_store():
print(request.data)
print(request.get_json())
return 'haha'
@cdkamat
cdkamat / install-tmux
Last active March 17, 2023 01:03 — forked from rothgar/install-tmux
Install tmux 2.3 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/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 23, 2024 16:51
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: