This file contains 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
$ time for ip in $(< /tmp/pinglist); do ping -c 2 $ip; echo; done | |
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. | |
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.115 ms | |
64 bytes from 127.0.0.1: icmp_req=2 ttl=64 time=0.031 ms | |
--- 127.0.0.1 ping statistics --- | |
2 packets transmitted, 2 received, 0% packet loss, time 999ms | |
rtt min/avg/max/mdev = 0.031/0.073/0.115/0.042 ms | |
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data. |
This file contains 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
$ time cat /tmp/pinglist | xargs --max-args=1 --max-procs=10 -IZ ping -c 1 Z | |
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data. | |
PING 192.168.127.120 (192.168.127.120) 56(84) bytes of data. | |
PING 192.168.122.1 (192.168.122.1) 56(84) bytes of data. | |
PING 10.10.10.50 (10.10.10.50) 56(84) bytes of data. | |
64 bytes from 192.168.127.120: icmp_req=1 ttl=64 time=0.043 ms | |
--- 192.168.127.120 ping statistics --- | |
64 bytes from 192.168.122.1: icmp_req=1 ttl=64 time=0.034 ms | |
64 bytes from 127.0.0.2: icmp_req=1 ttl=64 time=0.043 ms |
This file contains 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
$ time cat /tmp/pinglist | xargs --max-args=1 --max-procs=10 -IZ flock -x /tmp/pinglist -c "ping -c 1 Z; echo" | |
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. | |
64 bytes from 127.0.0.1: icmp_req=1 ttl=64 time=0.096 ms | |
--- 127.0.0.1 ping statistics --- | |
1 packets transmitted, 1 received, 0% packet loss, time 0ms | |
rtt min/avg/max/mdev = 0.096/0.096/0.096/0.000 ms | |
PING 192.168.122.1 (192.168.122.1) 56(84) bytes of data. | |
64 bytes from 192.168.122.1: icmp_req=1 ttl=64 time=0.091 ms |
This file contains 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
diff --git a/plugin/restore_view.vim b/plugin/restore_view.vim | |
index cf43019..aff1404 100644 | |
--- a/plugin/restore_view.vim | |
+++ b/plugin/restore_view.vim | |
@@ -43,6 +43,7 @@ function! MakeViewCheck() | |
if &modifiable == 0 | return 0 | endif | |
if len($TEMP) && expand('%:p:h') == $TEMP | return 0 | endif | |
if len($TMP) && expand('%:p:h') == $TMP | return 0 | endif | |
+ if strlen(expand('%:p')) > 31 | return 0 | endif | |
This file contains 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
# Capture 100 Packets | |
sh-3.2# tshark -i en1 -c 100 -s0 -w dns.pcap port 53 | |
Capturing on en1 | |
100 | |
# Pcap Size | |
sh-3.2# du -sh dns.pcap | |
16K dns.pcap | |
# 100 Packets to a text file |
This file contains 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
# dtruss: an strace equivalent for OSX | |
# dtruss nslookup www.google.com | |
Server: 192.168.1xx.2 | |
Address: 192.168.1xx.2#53 | |
Non-authoritative answer: | |
Name: www.google.com | |
Address: 197.80.128.24 |
This file contains 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
sh-3.2# date; syscallbypid.d; date | |
Sun Jan 20 22:42:47 SAST 2013 | |
Tracing... Hit Ctrl-C to end. | |
^C | |
PID CMD SYSCALL COUNT | |
1 launchd fork 1 | |
... | |
... | |
61275 dtrace workq_kernreturn 82 | |
87 eTSrv stat64 86 |
This file contains 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
# Process | |
sh-3.2# ps aux | grep " [1]3\W" | |
root 13 0.0 0.3 2497244 13416 ?? Rs Thu08PM 1:52.96 /usr/libexec/opendirectoryd | |
# What file thinks | |
sh-3.2# file /usr/libexec/opendirectoryd | |
/usr/libexec/opendirectoryd: Mach-O universal binary with 2 architectures | |
/usr/libexec/opendirectoryd (for architecture x86_64): Mach-O 64-bit executable x86_64 | |
/usr/libexec/opendirectoryd (for architecture i386): Mach-O executable i386 |
This file contains 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 | |
import cv2 | |
import numpy as np | |
import pymeanshift as pms | |
from blobs.BlobResult import CBlobResult | |
from blobs.Blob import CBlob # Note: This must be imported in order to destroy blobs and use other methods |
This file contains 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
#include <stdio.h> | |
#include <unistd.h> | |
#include <string.h> | |
void open_file(char *filename) | |
{ | |
FILE *fd = fopen(filename, "r"); | |
} | |
int main(void) |
OlderNewer