aaa
- item1
- item2
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <fuse.h> | |
| // Synopsis: | |
| // gcc fuse_minimal.c -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 `pkg-config --cflags --libs fuse` -o fuse_minimal | |
| // ./fuse_minimal -f /mnt/fuse_minimal | |
| int fuse_getattr(const char *path, struct stat *statbuf); |
| grep -Po "[\xe4-\xe9][\x80-\xbf][\x80-\xbf]" wordsjp wordsjp1 wordsjp2|sort|uniq|wc -l |
| From 7341a316c38a61cc745ce04e618916677007883b Mon Sep 17 00:00:00 2001 | |
| From: Timothy Brom <thb@timbrom.com> | |
| Date: Wed, 29 Feb 2012 11:29:55 -0500 | |
| Subject: [PATCH] Fixed error about strexh and strexb using the same register | |
| --- | |
| example/libs_stm/inc/core_support/core_cm3.c | 4 ++-- | |
| 1 files changed, 2 insertions(+), 2 deletions(-) | |
| diff --git a/example/libs_stm/inc/core_support/core_cm3.c b/example/libs_stm/inc/core_support/core_cm3.c |
| #!/bin/bash | |
| grep '[\x{4E00}-\x{9FBF}|\x{3040}-\x{309F}|\x{30A0}-\x{30FF}]' test.txt |
| sub group | |
| { | |
| my ($group_size, @array) = @_; | |
| my ($i, @ret); | |
| push @{$ret[$i++/$group_size]}, $_ for @array; | |
| return @ret; | |
| } |
| add_cronjob() { | |
| if [[ `crontab -l|grep "$2"` ]]; then | |
| echo "Cronjob already exists, do not adding" | |
| return | |
| fi | |
| (crontab -l; echo "$1" "$2")|crontab - | |
| } | |
| # add_cronjob '*/1 * * * *' 'cd /var/www/cgi-bin/ && ./run.sh 2>&1 >/dev/null' |
| # Synopsis: | |
| # LSUsbParser = create_parser('LSUsbResult', 'ID (\w+):(\w+) (.*)', | |
| # LSUsbParser.parse(subprocess.check_output("lsusb")) | |
| import functools, re, collections | |
| def match_against_field_names(regex, field_names, string): | |
| matched = re.search(regex, string) | |
| if matched is not None: | |
| return dict(zip(field_names, matched.groups())) |
| #!/usr/bin/perl | |
| # Generates PyUSB equivalent from the capture log | |
| # | |
| # Synopsis: | |
| # ./gen_pyusb.pl <test_unit_ready.cap --asserts | |
| # dev.write(2, hex_to_list('55534243707ec2810000000000000600000000000000000000000000000000')) | |
| # assert(list(dev.read(0x81, 26)) == hex_to_list('55534253707ec2810000000000')) | |
| # | |
| # .vimrc: |
| # Synopsis: | |
| # set_base_dir ../branch1/cgi-bin/ | |
| # merge index.cgi | |
| # merge ../style.css | |
| alias merge=merge_changes | |
| set_base_dir() { | |
| export BASE_DIR=$(readlink -f $1) | |
| } | |
| merge_changes() { |