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
Firmwares: | |
http://downloads.polycom.com/voice/voip/sip_sw_releases_matrix.html | |
http://downloads.polycom.com/voice/voip/uc_sw_releases_matrix.html | |
Configuration: | |
http://etel.wiki.oreilly.com/wiki/index.php/Dynamic_Phone_Provisioning_with_res_phoneprov_and_TFTP | |
https://freeswitch.org/confluence/display/FREESWITCH/Polycom+Configuration | |
Reset Codes: | |
1. Find and write down the MAC id of the phone you want to reset. You can typically find it on the back of the phone. If the label on the back of the phone with the MAC id is removed, you can find it by pressing Menu, Status, Network, Ethernet. |
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
The following are list of tools i use. | |
Encryption: | |
ShadowCrypt | |
Programming IDEs: | |
PHPStorm | |
IntelliJ | |
RStudio/Revolution R Open | |
RegEx Buddy |
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
Install yajl2 | |
$cd ~ | |
$git clone https://github.com/lloyd/yajl.git | |
$cd yajl/ | |
$sudo ./configure | |
$sudo make | |
$sudo make install | |
$sudo ln -s /usr/local/lib/libyajl_s.a /usr/lib64/libyajl_s.a |
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 |
OlderNewer