Skip to content

Instantly share code, notes, and snippets.

😀

oxpy oxpy

😀
Block or report user

Report or block oxpy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oxpy
oxpy / post.lua
Created May 20, 2019 — forked from lidashuang/post.lua
use luasocket send post data
View post.lua
#!/usr/bin/env lua
local http=require("socket.http");
local request_body = [[login=user&password=123]]
local response_body = {}
local res, code, response_headers = http.request{
url = "http://httpbin.org/post",
method = "POST",
headers =
@oxpy
oxpy / asyncio intro.md
Created Apr 4, 2019 — forked from flisky/asyncio intro.md
Introduce to AsyncIO
View asyncio intro.md

AsyncIO

Prerequisite

Overviews

PEP: 3165
python module name: asyncio, new in Python 3.4
reference implementation: tulip
backport: trollius ( python >= 2.6)

@oxpy
oxpy / InstallingAgOnCentOS.md
Created Feb 27, 2019 — forked from rkaneko/InstallingAgOnCentOS.md
Installing ag: the silver searcher on CentOS.
View InstallingAgOnCentOS.md

Installing ag on CentOS

Prerequistes

  • libpcre
  • liblzma

Download, build and install

@oxpy
oxpy / README.md
Created Feb 24, 2019 — forked from csswizardry/README.md
Vim without NERD tree or CtrlP
View README.md

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@oxpy
oxpy / setting.xml
Created Jan 27, 2019 — forked from rosuH/setting.xml
[Aliyun Maven] #Java #Maven
View setting.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups />
<proxies />
<servers />
<localRepository>D:/server/maven/repository</localRepository>
@oxpy
oxpy / Install NVIDIA Driver and CUDA.md
Created Jan 17, 2019 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
View Install NVIDIA Driver and CUDA.md
@oxpy
oxpy / git_submodules.md
Created Aug 12, 2018 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation
View git_submodules.md

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@oxpy
oxpy / gist:895064f5a08c9b0e069a32255b710f0d
Created Jun 28, 2018 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi
View gist:895064f5a08c9b0e069a32255b710f0d

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

@oxpy
oxpy / java-snippets.md
Created Jun 17, 2018 — forked from thomd/java-snippets.md
Java code snippets
View java-snippets.md

Java Snippets

Converting Strings to int and int to String

String a = String.valueOf(2); 
int i = Integer.parseInt(a);  

Convert String to Date

View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
You can’t perform that action at this time.