See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| <?php | |
| // 1) Escaping on; View template | |
| $manufacturers = $sf_user->getAttribute('manufacturer_ids', array(), 'mdUser'); | |
| $user_manufacturers->getRawValue(); // returns an array() | |
| // for variables in view template | |
| echo $sf_data->getRaw('variable_name'); | |
| // disable escaping from class method output |
| #!/usr/bin/env php | |
| <?php | |
| /* | |
| * This file is part of the Symfony package. | |
| * | |
| * (c) Fabien Potencier <[email protected]> | |
| * | |
| * For the full copyright and license information, please view the LICENSE | |
| * file that was distributed with this source code. |
| /** | |
| * Check if a given ip is in a network | |
| * @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
| * @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed | |
| * @return boolean true if the ip is in this range / false if not. | |
| */ | |
| function ip_in_range( $ip, $range ) { | |
| if ( strpos( $range, '/' ) == false ) { | |
| $range .= '/32'; | |
| } |
| Detecting and Mitigating DDOS Attacks | |
| #List all Finish (FIN) packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 1 != 0' | |
| #List all SYN and SYN-ACK packets | |
| machine1 : sudo /usr/sbin/tcpdump -Nnn -i any -s0 'tcp[13] & 2 != 0' | |
| highlightClue: function() { | |
| var clue; | |
| $('.clues-active').removeClass('clues-active'); | |
| $('#puzzle-clues li' + '[data-position=' + activePosition + ']').addClass('clues-active'); | |
| if (mode === 'interacting') { | |
| clue = $('#puzzle-clues li' + '[data-position=' + activePosition + ']'); | |
| activeClueIndex = $(clueLiEls).index(clue); | |
| // If all input have been filled, strike the clue |
| // .opinions | |
| article + section, | |
| section + section { | |
| margin-top:$grid-gutter-width * 3/4; | |
| } |
| 6‌75 Massachusetts Ave, Cambridge, MA 02139 |
| <?php | |
| class Pmc_Debug | |
| { | |
| protected static $_threshold_to_hide = 0.1; | |
| public static function get_threshold_to_hide() { | |
| return static::$_threshold_to_hide; | |
| } | |
| public static function set_threshold_to_hide( $time ) { |