This file contains hidden or 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
| # prtdiag | |
| System Configuration: LENOVO 3626GG4 | |
| BIOS Configuration: LENOVO 6QET61WW (1.31 ) 10/26/2010 | |
| ==== Processor Sockets ==================================== | |
| Version Location Tag | |
| -------------------------------- -------------------------- | |
| Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz None |
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| dtrace -n return'{ustack()}' | |
| for python | |
| """ | |
| from byteplay import * | |
| def seekret(code): |
This file contains hidden or 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
| > ::walkers ! grep mod_hash | |
| mod_hash_entries - walk the mod_hash_entries cache | |
| modchain - walk list of entries in a given mod_hash_entry | |
| modent - walk list of entries in a given mod_hash | |
| modhash - walk list of mod_hash structures | |
| > ::dcmds ! grep mod_hash | |
| modent - display information about a mod_hash_entry | |
| modhash - display information about one or all mod_hash structures | |
| > ::modhash ! grep mac_impl | |
| ffffff01c7581a40 43 8 1 4 mac_impl_hash |
This file contains hidden or 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
| #!/bin/bash | |
| db=$1 | |
| pat=$2 | |
| for table in $(psql -Atc '\dt' -d $db | awk -F\| '{print $2}'); do | |
| psql -Atc "select * from $table" -d $db | grep $pat | sed "s/^/$table:/" | |
| done |
This file contains hidden or 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
| % cat t.c | |
| int f3(void) { return 1; } | |
| int f2(void) { return f3(); } | |
| int f1(void) { return f2(); } | |
| int | |
| main(int argc, char **argv) | |
| { | |
| while (1) | |
| f1(); |
This file contains hidden or 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
| #!/usr/sbin/dtrace -Cs | |
| #pragma D option quiet | |
| fbt::__mac_execve:entry, fbt::posix_spawn:entry | |
| { | |
| self->want_malloc = 1; | |
| } | |
| /* | |
| * First _MALLOC call inside execve/posix_spawn allocates memory |
This file contains hidden or 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
| #!/usr/bin/env dtrace -s | |
| /* tested on linux */ | |
| typedef struct sockaddr_in { | |
| short sin_family; | |
| unsigned short sin_port; | |
| unsigned char a0; | |
| unsigned char a1; | |
| unsigned char a2; |
This file contains hidden or 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
| #!/usr/bin/env dtrace -s | |
| typedef struct sockaddr_in { | |
| short sin_family; | |
| unsigned short sin_port; | |
| unsigned char a0; | |
| unsigned char a1; | |
| unsigned char a2; | |
| unsigned char a3; | |
| } sockaddr_in_t; |
This file contains hidden or 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
| #!/usr/local/bin/dtrace -s | |
| //#define d_name(dent) ((uintptr_t) ((struct dentry *)dent)->d_name.name)) | |
| fbt::vfs_create:entry, | |
| fbt::vfs_unlink:entry | |
| { | |
| printf("%s[%d]: %s", execname, pid, copyinstr((uintptr_t) ((struct dentry *)arg1)->d_name.name)); | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| SVN_HOST="https://svn/path/to/repo" | |
| git checkout master | |
| git pull --rebase | |
| git config --local svn-remote.svn.url "${SVN_HOST}" | |
| git config --local svn-remote.svn.fetch ":refs/remotes/git-svn" | |
| git config --local svn.rmdir true |