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
| tell application "System Events" | |
| tell application "Safari" to activate | |
| delay 0.5 | |
| repeat 2 times | |
| key code 124 | |
| delay 0.5 | |
| end repeat | |
| repeat 4 times | |
| key code 125 | |
| delay 0.5 |
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
| find -sx /home/ -type f \ | |
| \( -iname '*.php' -or -perm -u+x -or -perm -g+x -or -perm -o+x \) \ | |
| -exec ls -liTd \{\} \+ | | |
| check_diff new_only chkwebscripts - "${host} new or modified PHP/CGI scripts:" | | |
| perl -l0 -ne 'print $1 if m{(/home.*?)$}' | xargs -0 clamscan |
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
| require File.expand_path(File.dirname(__FILE__) + '/edgecase') | |
| # Project: Create a Proxy Class | |
| # | |
| # In this assignment, create a proxy class (one is started for you | |
| # below). You should be able to initialize the proxy object with any | |
| # object. Any messages sent to the proxy object should be forwarded | |
| # to the target object. As each message is sent, the proxy should | |
| # record the name of the method send. | |
| # |
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
| $ pbpaste | perl -Minteger -pe'1 while s!(?:\(\s*(?:\d+\s*[\+\-\*/]\s*)+\d+\s*\))|(?:\d+\s*[\+\-\*/]\s*)+\d+!$&!ee' | |
| 8 | |
| 6 | |
| 16 | |
| 47 | |
| 57 | |
| 64 | |
| 39 |
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
| for (var i = 0; i < unfiltered.length; i++) { | |
| if (unfiltered[i].host in config.hosts && | |
| unfiltered[i].type_instance in config.hosts[unfiltered[i].host].type_instance) { | |
| filtered.push(unfiltered[i]); | |
| } | |
| } |
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
| PreCacheChain "PreCache" | |
| PostCacheChain "PostCache” | |
| <Chain "PreCache"> | |
| <Rule "send_iface_to_node"> | |
| <Match "regex"> | |
| Plugin "^interface$" | |
| Type "^if_octets$" | |
| </Match> | |
| <Target "write"> |
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
| use IO::Pipeline; | |
| use Data::Dump qw(dump); | |
| sub ptap (;&) { my $tap = shift || sub { print }; return pgrep { $tap->(); 1 } } | |
| my $source = <<'END'; | |
| 2010-03-21 16:15:30 1NtNoI-000658-6V Completed | |
| 2010-03-21 16:17:29 1NtNlx-00062B-0R Completed | |
| 2010-03-21 16:20:37 1NtNtF-0006AE-G6 Completed | |
| 2010-03-21 16:28:37 no host name found for IP address 218.108.42.254 |
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 perl | |
| use strict; | |
| use integer; | |
| use feature ':5.10'; | |
| my $quoted_field = qr/"(?>(?:(?>[^"\\]+)|\\.)*)"/; | |
| my $parse_combined = qr/^ | |
| (?<ip>\S+) \s+ # IP address | |
| (?<ident>\S+) \s+ # Ident |
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
| $ ./configure --prefix=/usr/local/collectd --without-included-ltdl | |
| checking build system type... i386-unknown-freebsd7.2 | |
| checking host system type... i386-unknown-freebsd7.2 | |
| checking for gcc... gcc | |
| blah blah blah | |
| checking whether libtool supports -dlopen/-dlpreopen... yes | |
| checking for ltdl.h... no | |
| checking where to find libltdl headers... -I${top_srcdir}/libltdl |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>org.collectd.collectd</string> | |
| <key>ProgramArguments</key> | |
| <array> | |
| <string>/opt/collectd/sbin/collectd</string> | |
| <string>-f</string> |