Skip to content

Instantly share code, notes, and snippets.

View flyfire's full-sized avatar
🎯
Focusing

flyfire flyfire

🎯
Focusing
View GitHub Profile
Scripts|⇒ python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py
import site # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc
# /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py
import os # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
directory_name() {
PROMPT_PATH=""
CURRENT=`dirname ${PWD}`
if [[ $CURRENT = / ]]; then
PROMPT_PATH=""
elif [[ $PWD = $HOME ]]; then
PROMPT_PATH=""
else
if [[ -d $(git rev-parse --show-toplevel 2>/dev/null) ]]; then
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from xml.dom import minidom
from urllib import request
#代理设置
#request.install_opener(request.build_opener(request.ProxyHandler(
# {"http" : "http://192.168.60.250:8080"}
#)));
#include <stdio.h>
#include <stdlib.h>
typedef struct link_tag
{
int no;
struct link_tag *next;
}Link;
void createJoseph(Link *&L, int n)
{
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int m,n,i,j;
printf("输入人数:");
scanf("%d",&n);
scanf("%*[^\n]");
int *a = (int *)malloc(sizeof(int) * n);
#include "bintree.h"
extern p_btree_t btree_create(void){
p_btree_t bintree;
if((bintree=(p_btree_t)malloc(sizeof(btree_t)))==NULL){
errno=ENOMEM;
return NULL;
}
bintree->count=0;
if((bintree->root=(p_btnode_t)malloc(sizeof(btnode_t)))==NULL){
@flyfire
flyfire / solarized-dark.xcs
Created October 8, 2013 10:50 — forked from clyfish/solarized-dark.xcs
Solarized Colorscheme for XShell
[Solarized Dark]
text(bold)=839496
magenta(bold)=6c71c4
text=839496
white(bold)=fdf6e3
green=859900
red(bold)=cb4b16
green(bold)=586e75
black(bold)=073642
red=dc322f
#!/bin/bash
downloads_dir=~/downloads
#>>>>>>>>>>linux系统相关
#>>>>>>>>>>scm配置管理相关
#>>>>>>>>>>分布式编译相关
#>>>>>>>>>>linux系统相关
#>>>>>>>>>>字符串处理相关
function unset_color()
{
unset GREP_OPTIONS
@flyfire
flyfire / README.md
Created November 13, 2013 04:37 — forked from oklai/README.md

TCTicketScript

TCTicketScript是一段浏览器脚本,帮你自动查询火车票余票。

如何使用

  1. 进入https://dynamic.12306.cn/otsweb/,注意必须从这个地址进入,忽略警告信息;
  2. 在页面设定好你的出发地、目的地与出发日期;
  3. 复制TCTicketScript.js中的代码;
  4. 打开浏览器调试工具控制台(F12),执行此代码。第一次会询问是否开启桌面提示功能,需同意。