Skip to content

Instantly share code, notes, and snippets.

@zhiyelee
Last active August 29, 2015 13:57
Show Gist options
  • Save zhiyelee/9403314 to your computer and use it in GitHub Desktop.
Save zhiyelee/9403314 to your computer and use it in GitHub Desktop.
gView sample -- this description will be showed in the head of the page and used as the title. I just want to make this description long enough.

View gists in a more grace page.

Usage

visit http://g.zhiye.li/:gistid to view the gist, eg

// for below gitst 
https://gist.github.com/zhiyelee/9403314

// visit
http://g.zhiye.li/9403314
A directory is a special kind of file; its contents is a set of (filename, i-node) tuples. Thus directory’s mtime is updated whenever a tuple(file or subdirectory) is added, removed or renamed .
Modifying the contents of a file within the directory does not change the directory itself, nor does updating the mtime of a file or a subdirectory.
When file’s metadata changes (owner, group, mode, atime, ctime, mtime - hosted in i-node), directory’s mtime is NOT updated (neither on the file nor containing directory) but the file’s ctime does.
mtime of a subdirectory will not influence the containing directory unless the subdirectory’s is renamed. So that is said mtime of a subdirectory will not bubbled to the root.
async Task<int> A()
{
// ...
string url= await getStringTask;
return url.Length;
}
#gview .sample p {
left: -1px;
width: 16px;
color: #999;
text-align: center;
-webkit-transition: color 0.25s;
transition: color 0.25s;
}
<section class="sample fav">
<strong>sample for html</strong>
</section>
/**
* @author zhiyelee <[email protected]>
* @version 1.0
*/
package a.b.model;
import java.util.ArrayList;
public abstract class L2Character extends L2Object {
public static final Short BC = 0x002;
public void stepTo(int x) {
_log.warning("Should not be called");
if (x > 5) {
return;
}
}
}
/**
util functions
**/
function merge(a, b){
for(var i in b){
a[i] = b[i];
}
return a;
}
exports.merge = merge;
@requires_authorization
def somefunc(a='', b=0):
r'''A docstring'''
if a > b: # interesting
print 'got it'
return (a + 1 + 0b10l) or None
class SomeClass:
pass
time for a in {1..50};
do grunt copy:timestamp;
done

Sample elements

list

  • merge mix
  • OOP
    • extend
    • augment
    • aggregate
  • bind rbind

code

var animal = { eats: true }
var rabbit = { jumps: true }
 
rabbit.__proto__ = animal  // inherit
 
console.log(rabbit.eats) // true
 
var animal = { eats: true }
rabbit = Object.create(animal);
 
// true
console.log(rabbit.eats);

img

sun

quote

welcome contribute to the repo: gview

p

A directory is a special kind of file; its contents is a set of (filename, i-node) tuples. Thus directory’s mtime is updated whenever a tuple(file or subdirectory) is added, removed or renamed .

Modifying the contents of a file within the directory does not change the directory itself, nor does updating the mtime of a file or a subdirectory. When file’s metadata changes (owner, group, mode, atime, ctime, mtime - hosted in i-node), directory’s mtime is NOT updated (neither on the file nor containing directory) but the file’s ctime does. mtime of a subdirectory will not influence the containing directory unless the subdirectory’s is renamed. So that is said mtime of a subdirectory will not bubbled to the root.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment