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 | |
| #-------------------------------------------------------------------- | |
| # | |
| # can put this in your .bashrc or .zshrc | |
| # if [ -f ~/.git_bash_functions ]; then | |
| # . ~/.git_bash_functions | |
| # fi | |
| # | |
| #-------------------------------------------------------------------- |
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 | |
| // Usage and set up | |
| // change your-site to the subdomain being used for your campfire url | |
| // use the api token for the user you want posting the message | |
| // set the room id that you want the message to be posted to | |
| define('CAMPFIRE_URL', 'https://your-site.campfirenow.com/'); | |
| define('CAMPFIRE_API_TOKEN', 'apitokengoeshere'); | |
| $room_id = 12345; | |
| $message = 'I are a robot.'; |
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
| # ~/.bashrc: executed by bash(1) for non-login shells. | |
| # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
| # for examples | |
| # If not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines in the history. See bash(1) for more options | |
| # ... or force ignoredups and ignorespace | |
| HISTCONTROL=ignoredups:ignorespace |
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
| date('r', strtotime($mysql_datetime)); |
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
| /** | |
| * formats a datetime (yyyy-mm-dd hh:mm:ss) into a human readable elapsed format | |
| * | |
| * @return string | |
| * @param string datetime | |
| * @param string word that will end the string | |
| * @param int maximum value before returning the datetime in the datetime_format | |
| * @param string max unit to use | |
| * @param string datetime format | |
| */ |
NewerOlder