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
#!/bin/bash | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com> | |
## License: GNU General Public License v2, v3 | |
# | |
# Lockable script boilerplate | |
### HEADER ### | |
LOCKFILE="/var/lock/`basename $0`" |
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
1. Install composer (http://getcomposer.org/doc/00-intro.md#installation) | |
2. php composer.phar create-project slim/slim-skeleton server | |
3. npm install -g yo grunt-cli bower | |
4, npm install -g generator-angular | |
5. yo angular | |
6. bower install angular-bootstrap --save | |
7. edit bowerrc to make sure it points to the correct directory | |
8. cd server | |
9. php composer.phar slim-json-api |
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
On Master: | |
SELECT | |
client_addr, | |
sent_offset - ( | |
replay_offset - (sent_xlog - replay_xlog) * 255 * 16 ^ 6 ) AS byte_lag | |
FROM ( | |
SELECT | |
client_addr, | |
('x' || lpad(split_part(sent_location, '/', 1), 8, '0'))::bit(32)::bigint AS sent_xlog, |
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
$./configure --with-yajl=/usr/local/include/yajl | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /bin/mkdir -p | |
checking for gawk... gawk | |
checking whether make sets $(MAKE)... yes | |
checking whether make supports nested variables... yes | |
checking for style of include used by make... GNU | |
checking for gcc... gcc |
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
function ping($host, $timeout = 1) { | |
/* ICMP ping packet with a pre-calculated checksum */ | |
$package = "\x08\x00\x7d\x4b\x00\x00\x00\x00PingHost"; | |
$socket = socket_create(AF_INET, SOCK_RAW, 1); | |
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, array('sec' => $timeout, 'usec' => 0)); | |
socket_connect($socket, $host, null); | |
$ts = microtime(true); | |
socket_send($socket, $package, strLen($package), 0); | |
if (socket_read($socket, 255)) { | |
$result = microtime(true) - $ts; |
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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
# sox SuperMario.wav -r 8000 -U -c1 SuperMarioUL.wav |
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
# ngrep -W byline -d eth0 port 5060 | |
Capture to file | |
# ngrep -W byline -d eth0 port 5060 -O capture_file | |
Show INVITE only | |
# ngrep -W byline -d eth0 INVITE | |
HTTP Packets | |
# ngrep -t '^(GET|POST) ' 'src host 12.13.14.15 and tcp and dst port 80' |
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
http://cp.c-ij.com/en/contents/3156/03373/index.html | |
http://www.craftsy.com/project/paper-crafts?page=1 | |
http://global.yamaha-motor.com/yamahastyle/entertainment/papercraft/animal-japan/fukuro/ |
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
Check if value is in column range | |
=IF(ISNA(VLOOKUP(<single column I value>,<entire column E range>,1,FALSE)),FALSE, TRUE) |
OlderNewer