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
| /** | |
| * Compares two software version numbers (e.g. "1.7.1" or "1.2b"). | |
| * | |
| * This function was born in http://stackoverflow.com/a/6832721. | |
| * | |
| * @param {string} v1 The first version to be compared. | |
| * @param {string} v2 The second version to be compared. | |
| * @param {object} [options] Optional flags that affect comparison behavior: | |
| * <ul> | |
| * <li> |
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 session_start(); | |
| $session_ctr = array_key_exists('session_ctr', $_SESSION) ? $_SESSION['session_ctr'] : 0 ; | |
| $session_ctr = $session_ctr + 1; | |
| $_SESSION['session_ctr'] = $session_ctr; | |
| ?> | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Counting Visits By Section</title> |
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
| #office apps | |
| brew cask install microsoft-office | |
| brew cask install libreoffice | |
| #productivity and utilities | |
| brew cask install alfred | |
| brew cask install 1password | |
| brew cask install iterm2 | |
| brew cask install nvalt |
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
| from bs4 import BeautifulSoup | |
| import bs4 | |
| import re | |
| soup = BeautifulSoup(open("./test.html"),'html5lib'); | |
| acf_tags = ['rw-test','rw-repeater'] | |
| def is_acf_keyword(classname): |
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
| #download files via wget through ftp | |
| wget -X {EXCLUDED_FOLDERS,} -l {MAX_DEPTH} -r ftp://{USERNAME}:{PASSWORD}@{HOST}/{PATH} | |
| #secure copy | |
| scp {username}@{host}:{path} {destination} | |
| #dump mysql table remotely | |
| mysqldump -h{HOST} -u{USERNAME} -p{password} > {filename}.sql | |
| #zip files |