Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
{ | |
"module":"App.Home", | |
"actions":[ | |
{ | |
"type":"update", | |
"data":{ | |
"title":"bla" | |
}, | |
"name":"TAG.Controls.Body" | |
}, |
<?php | |
$string = "This is a example with special “quotes” and ‘single quotes’"; | |
echo $string . "\n"; | |
echo fixcurly($string) . "\n"; | |
function fixcurly($string) | |
{ |
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
function add_meta_tags() | |
{ | |
global $data; | |
if(!is_null($data['metas']['page_meta_description']) ) | |
{ | |
echo '<meta name="description" content="'.$data['metas']['page_meta_description'].'">'; | |
} | |
} | |
add_action('wp_head', 'add_meta_tags'); |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
// Parameters | |
def cmd = "ls -la" | |
def workdir = "/home/" | |
// Code | |
def sout = new StringBuilder(), serr = new StringBuilder() | |
def proc = cmd.execute(null, new File(workdir)) | |
proc.consumeProcessOutput(sout, serr) | |
proc.waitForOrKill(1000) | |
println "out> $sout err> $serr" |
See references here:
export CommonName="www.example.com"
export LocalityName="database"
Sub SMS() | |
Dim Result As String | |
Result = EnviarSMS("21", "999999999", "Mensagem", "Usuario", "Senha") | |
MsgBox Result | |
End Sub | |
Function RequestURL(Method As String, Dict As Variant) As String | |
Dim QueryString As String | |
Dim Key As Variant |
#!/usr/bin/env python | |
""" Print all of the clone-urls for a GitHub organization. | |
It requires the pygithub3 module, which you can install like this: | |
$ sudo yum -y install python-virtualenv | |
$ mkdir scratch | |
$ cd scratch | |
$ virtualenv my-virtualenv | |
$ source my-virtualenv/bin/activate |
version: '3.2' | |
services: | |
wordpress: | |
image: wordpress:4.8-php7.1 | |
environment: | |
- WORDPRESS_DB_HOST=mysql-container | |
- WORDPRESS_DB_USER=user | |
- WORDPRESS_DB_PASSWORD=password | |
- WORDPRESS_DB_NAME=wordpress | |
volumes: |