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
| <?php | |
| /** | |
| * First Method. | |
| */ | |
| function array_search_partial($arr, $keyword) { | |
| foreach($arr as $index => $string) { | |
| if (strpos($string, $keyword) !== FALSE) | |
| return $index; | |
| } | |
| } |
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
| function fadeOut(el){ | |
| el.style.opacity = 1; | |
| (function fade() { | |
| if ((el.style.opacity -= .1) < 0) { | |
| el.style.display = "none"; | |
| } else { | |
| requestAnimationFrame(fade); | |
| } | |
| })(); |
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
| #!/bin/bash | |
| HOSTSFILE="/etc/hosts" | |
| BAKFILE="$HOSTSFILE.bak" | |
| DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
| IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
| URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
| backup() | |
| { |
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
| ## Sublime Text 3 Serial key build is 3176 | |
| > * Added these lines into /etc/hosts | |
| 127.0.0.1 www.sublimetext.com | |
| 127.0.0.1 license.sublimehq.com | |
| > * Used the license key | |
| ----- BEGIN LICENSE ----- |
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 python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ | |
| __version__ = "0.1" | |
| __all__ = ["SimpleHTTPRequestHandler"] |