Skip to content

Instantly share code, notes, and snippets.

@penpenps
penpenps / index.html
Created September 24, 2015 02:40
Use XMLHttpRequest to upload file and handle it by Django
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" >
<title>XMLHttpRequest send file demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--set Document Mode to IE=edge -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Le styles -->
# Our .tmux.conf file
# Setting the prefix from C-b to C-a
# START:prefix
set -g prefix C-a
# END:prefix
# Free the original Ctrl-b prefix keybinding
# START:unbind
unbind C-b
# END:unbind
@penpenps
penpenps / .zshrc
Created November 20, 2018 09:33
zsh config
# =============================================================================
# Functions
# =============================================================================
# powerlevel9k_random_color(){
# local code
# #for code ({000..255}) echo -n "$%F{$code}"
# #code=$[${RANDOM}%11+10] # random between 10-20
# code=$[${RANDOM}%211+20] # random between 20-230
# printf "%03d" $code
# }
new_menus = []
def update_menu_info(menu, project_id, parent_id=None, order, level=0):
if menu.get('mobile'):
menu.setting.update({'mobile': menu.pop('mobile')})
menu.update({
'project_id': project_id,
'parent_id': parent_id,
'order': order,
'level': level
[
{
"id": 1,
"task": "Reading a book",
"status": "In Progress",
"createAt": "2019-11-05"
},
{
"id": 2,
"task": "Cooking",