Peer-reviewed code snippets that anyone can edit
follow refactory on twitter
blog
feedback
A wiki for useful code snippets
Bugs? Suggestions?
38-107-191-111
create/login
options
RECENT
STUBS/REQUESTS
STARRED
ACTIVITY
ADD
VIEW
EDIT
FORK
find C symbols recursively into all subdirs
c
cpp
bash
symbol
header
c
subdirectories
Your work won't be attributed to you
because you aren't logged in.
Login using OpenID or an existing username, or create a username
(no email required) before posting.
Languages
Comma separated. Like
ruby, rails
or
java, swing
Keywords
Comma separated. Like
file, network
Mark as stub
Snippet
Wrap code in
[code=
language
][/code]
- Use
WikiText markup
outside of [code] tags
[code=bash] #!/bin/bash if [ -z "$1" ]; then echo "$0 is a tool to fast-find C symbols recursively into all subdirs" echo "in .c .cxx .cpp .h files" echo "it uses a combination of 'find' and 'grep'" echo echo sintax: echo $0 "<regex-pattern>" exit 1 else pattern=$1 shift fi if [ -z "$1" ]; then dirs="." else dirs="$*" shift fi find $dirs \( -name "*.c" -or -name "*.h" -or -name "*.cpp" -or -name "*.cxx" \) -exec grep -in "$pattern" {} \; -print [/code]
Log message
Human?
public snippets
This is a community-maintained collection of reusable code snippets.
Contribute something
without logging in, or improve existing contributions. All code is dedicated to the public domain unless otherwise specified.
stats
/
top contributers