Skip to content

Instantly share code, notes, and snippets.

View decoda's full-sized avatar
:octocat:
nothing happend

decoda decoda

:octocat:
nothing happend
  • gz
View GitHub Profile
{"version":1,"resource":"file:///c%3A/Users/gz1347/Project/main.py","entries":[{"id":"lHdI.py","timestamp":1662622890357},{"id":"SXc1.py","timestamp":1662622911800},{"id":"sGXc.py","timestamp":1662622938030},{"id":"oWJp.py","source":"renamed.source","timestamp":1662623002623},{"id":"XDz0.py","timestamp":1662623024246},{"id":"8OTr.py","timestamp":1662623057045},{"id":"V6SZ.py","timestamp":1662623076557},{"id":"QuM2.py","timestamp":1662623192434},{"id":"w3l5.py","timestamp":1662623252882},{"id":"aj6N.py","timestamp":1662623445927},{"id":"sxrt.py","timestamp":1662623462825},{"id":"SUqO.py","source":"undoRedo.source","timestamp":1662623465722},{"id":"zg9i.py","timestamp":1662623497322},{"id":"0K7t.py","timestamp":1662623623314},{"id":"nUIy.py","timestamp":1662623639874},{"id":"xcEu.py","timestamp":1662623812645},{"id":"3O4d.py","timestamp":1662623921931},{"id":"6Zyj.py","timestamp":1662623988586},{"id":"nfBN.py","timestamp":1662624062816},{"id":"NqDB.py","timestamp":1662624108193},{"id":"qTZM.py","timestamp":1662
##############################################################################
# BASH CHEATSHEET (中文速查表) - by skywind (created on 2018/02/14)
# Version: 47, Last Modified: 2019/09/24 17:58
# https://github.com/skywind3000/awesome-cheatsheets
##############################################################################
##############################################################################
# 常用快捷键(默认使用 Emacs 键位)
##############################################################################
@decoda
decoda / lua_cjson.c
Created October 12, 2019 09:27
cjson double转整形,table整数
/* Lua CJSON - JSON support for Lua
*
* Copyright (c) 2010-2012 Mark Pulford <mark@kyne.com.au>
*
* 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 copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
@decoda
decoda / nginx_proxy.conf
Created August 8, 2019 02:49
nginx代理
server {
listen 80;
server_name 192.168.1.250;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Connection "";
proxy_http_version 1.1;
@decoda
decoda / aliyun_ddns.py
Created July 29, 2019 06:13
阿里云域名解析脚本
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import os
import re
from datetime import datetime
import urllib2
from aliyunsdkcore import client
@decoda
decoda / batsh
Created January 10, 2019 01:32
排除指定文件批量删除
bat:
for /f "delims=" %% A in ('dir /b *.xx ^| findstr /v "table_.*.xx" | find /v "proto_.*_pb.xx"') do (
echo del %%A
del %%A
)
shell:
ls *.xx | grep -Ev '^(table|proto)_.+.xx' | xargs rm -f
@decoda
decoda / HttpUpload.cs
Last active January 4, 2019 12:15
c# http upload files
public static string HttpUploadFile(string url, string[] files, NameValueCollection data, Encoding encoding) {
string boundary = "------------------------------" + DataTime.Now.Ticks.ToString("x");
byte[] boundarybytes = Encoding.ASCII.GetBytes("--" + boundary + "\r\n");
byte[] endbytes = Encoding.ASCII.GetBytes("\r\n--" + boundary + "--\r\n");
byte[] newlinebytes = Encoding.ASCII.GetBytes("\r\n");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "multipart/form-data; boundary=" + boundary;
request.Method = "POST";
request.KeepAlive = true;
@decoda
decoda / erl_shuffle.erl
Last active June 26, 2023 08:02
Erlang Fisher-Yates algorithm
shuffle_list(L) ->
shuffle_list_sub(length(L), L).
shuffle_list_sub(N, L) when N > 1 ->
I = random:uniform(N),
L2 = exchange_element(N, I, L),
shuffle_list_sub(N - 1, L2);
shuffle_list_sub(_N, L) ->
L.
@decoda
decoda / Makefile
Created December 18, 2018 03:39
c++多文件makefile
TARGET := test
CC := g++
#注意每行后面不要有空格,否则会算到目录名里面,导致问题
SRC_DIR = src
BUILD_DIR = tmp
OBJ_DIR = $(BUILD_DIR)/obj
DEPS_DIR = $(BUILD_DIR)/deps
@decoda
decoda / Makefile
Last active June 27, 2023 11:36
c语言多文件makefile
.PHONY: all clean rebuild objs
TARGET := tetris
SRCDIRS := src src/*
OBJDIR := obj
CFLAGS := -Iinclude
LFLAGS :=
#vpath %.c $(wildcard $(SRCDIRS))