Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
<?php | |
class CalendarEvent { | |
/** | |
* | |
* The event ID | |
* @var string | |
*/ | |
private $uid; |
<?php | |
/** | |
* http://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string | |
* U+200B zero width space | |
* U+200C zero width non-joiner Unicode code point | |
* U+200D zero width joiner Unicode code point | |
* U+FEFF zero width no-break space Unicode code point | |
*/ | |
input { | |
lumberjack { | |
port => 5000 | |
type => "logs" | |
ssl_certificate => "/shared/logstash-certs/logstash-forwarder.crt" | |
ssl_key => "/shared/logstash-certs/logstash-forwarder.key" | |
} | |
} | |
## Add your filters here |
If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.
There are two ways to go about this:
Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
<?php | |
function tinker(...$args) { | |
// Because there is no way of knowing what variable names | |
// the caller of this function used with the php run-time, | |
// we have to get clever. My solution is to peek at the | |
// stack trace, open up the file that called "tinker()" | |
// and parse out any variable names, so I can load | |
// them in the tinker shell and preserve their names. |
Prefix | Description | Notes | |
---|---|---|---|
ac_ | Platform Client ID | Identifier for an auth code/client id. | |
acct_ | Account ID | Identifier for an Account object. | |
aliacc_ | Alipay Account ID | Identifier for an Alipay account. | |
ba_ | Bank Account ID | Identifier for a Bank Account object. | |
btok_ | Bank Token ID | Identifier for a Bank Token object. | |
card_ | Card ID | Identifier for a Card object. | |
cbtxn_ | Customer Balance Transaction ID | Identifier for a Customer Balance Transaction object. | |
ch_ | Charge ID | Identifier for a Charge object. | |
cn_ | Credit Note ID | Identifier for a Credit Note object. |