This file contains 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
require 'fileutils' | |
require 'optparse' | |
require 'pathname' | |
# 格式: ruby check_inode.rb --dry_run false --sincedb=/tmp/a.txt | |
# InodeStruct.new(@inode, stat.dev_major, stat.dev_minor) | |
def inode_struct(file_name) | |
stat = File.stat(file_name) | |
inode = stat.ino.to_s |
This file contains 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
def data = """ | |
<div id="app"> | |
<h1>{{msg}}</h1> | |
<input type="text" m-model="msg"/> | |
</div> | |
""".toCharArray() | |
def state = [idx:0,tokens:[],data:data] | |
def text(state){ |
This file contains 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
<script type="application/javascript" src="jquery.js"></script> | |
<style> | |
.table-bordered > thead > tr > th, | |
.table-bordered > tbody > tr > th, | |
.table-bordered > tfoot > tr > th, |
This file contains 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
[root@web144135 code]# more common.py | |
#!/usr/bin/env python | |
''' | |
This module contains some common routines used by other samples. | |
''' | |
# Python 2/3 compatibility | |
from __future__ import print_function | |
import sys |