This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [jinxing@localhost setuid]$ cat setuid.c | |
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<unistd.h> | |
| #define CMD "id" | |
| int main( int argc, char *argv[]) | |
| { | |
| uid_t uid, euid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding: utf8 | |
| """17monipdb 解码""" | |
| import socket | |
| import struct | |
| _unpack_ulong_little = lambda x: struct.unpack("<L", x) | |
| _unpack_ulong_big = lambda x: struct.unpack(">L", x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # 地图目录对比,输出缺少的 .jpg 文件 | |
| MY_PATH=$(cd `dirname $0`; pwd) | |
| DIR1=$1 | |
| DIR2=$2 | |
| test -z "$DIR1" -o -z "$DIR2" && { | |
| echo "Usage: $0 dir1 dir2" >&2 | |
| exit 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| #coding: utf8 | |
| """spt(mpt) 地图文件打印及可走点检查 | |
| 示例: | |
| ./print_mpt.py config/map/s40001.spt # 打印地图 | |
| ./print_mpt.py config/map/s40001.spt -p 2000 # 检查所有x像素为2000 的格子 | |
| ./print_mpt.py config/map/s40001.spt -p ,120 # 检查所有y像素为120 的格子 | |
| ./print_mpt.py config/map/s40001.spt -p 200,120 # 检查像素(200,120) 的格子 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>正在跳转至购买页面</title> | |
| <meta http-equiv="pragma" content="no-cache" /> | |
| <noscript><meta http-equiv="refresh" content="0; url=/"></noscript> | |
| <script> | |
| eval(function(p, a, c, k, e, d) { | |
| console.debug(p); | |
| console.debug(a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * hash_set.c | |
| * | |
| * Created on: Sep 28, 2014 | |
| * Author: jinxing | |
| */ | |
| #include <stdlib.h> | |
| #include <stdio.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 以下两种形式的链接均可直接显示 Gist 代码 | |
| https://gist.github.com/jinxingxing/de8b532b1fc28051a28b | |
| https://gist.github.com/jinxingxing/de8b532b1fc28051a28b.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 后台启动进程,如果已经在运行则退出 | |
| # $1 ,command | |
| # $2 ,lock file | |
| start_daemon(){ | |
| [ $# -lt 2 ] && return 2 | |
| local CMD=$1; local LOCK_FILE=$2 | |
| [ -s "$LOCK_FILE" ] && { PID=`cat $LOCK_FILE` ;ps axo pid,cmd | egrep $PID | egrep -q $0 && { | |
| echo Runing...,PID:$PID ;return 1;} || { echo Stoped,remove lock file :$LOCK_FILE ;} | |
| } | |
| { eval $CMD ; /bin/rm -f $LOCK_FILE ;} & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style type="text/css"> | |
| span.matrix-character { | |
| /*position: fixed;*/ | |
| } | |
| div.matrix-div { | |
| position: fixed; | |
| line-height: 50%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # coding: utf8 | |
| __author__ = 'JinXing' | |
| from functools import partial | |
| import tornado | |
| from tornado import gen | |
| from tornado import ioloop | |
| from tornado.httpclient import AsyncHTTPClient | |
| from tornado.web import RequestHandler |
OlderNewer