This file contains 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
version: "2.0" | |
volumes: | |
db_data: | |
services: | |
# Web | |
web: | |
hostname: web |
This file contains 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
--- | |
# test SSH agent forwarding | |
- shell: echo "Client= [$SSH_CLIENT] Sock= [$SSH_AUTH_SOCK]" | |
sudo: no | |
register: myecho | |
- debug: msg="{{myecho.stdout}}" | |
- shell: ssh-add -l | |
sudo: no | |
register: myecho | |
- debug: msg="{{myecho.stdout}}" |
This file contains 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
http://www.w3schools.com/json/tryit.asp?filename=tryjson_function |
This file contains 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 | |
/** | |
* @Then /^(?:|I )should see the following in the repeated "(?P<element>[^"]*)" element within the context of the "(?P<parentElement>[^"]*)" element | |
*/ | |
public function assertRepeatedElementContainsText(TableNode $table, $element, $parentElement) | |
{ | |
$parent = $this->getSession()->getPage()->findAll('css', $parentElement); | |
foreach ($table->getHash() as $n => $repeatedElement) { | |
$child = $parent[$n]; |
This file contains 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/python | |
import os | |
import sys | |
tree = [] | |
def main(argv): | |
# extract path to an attachment directory (remove *.txt extension) | |
path = argv[1] |
This file contains 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
# -*- coding: utf-8 -*- | |
# | |
# treemapeditor.py | |
# | |
# This is a plugin for Zim, which creates treeMap graph based on tabbed keywords. | |
# Initial version comes from the following source: http://blog.ynema.com/?p=192 | |
# | |
# | |
# Author: NorfCran <norfcran@gmail.com> | |
# Date: 2015-07-09 |
This file contains 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/python | |
## This custom tool helps to create mindmap like diagrams | |
# the main core algorithm comes from http://blog.ynema.com/?p=192 | |
# adapted to suit the ZIM structure and some additional improvement of nodes (like a formating feature) | |
# write page with content corresponding to the webpage http://www.text2mindmap.com/ | |
# it automatically creates a png file in the same folder as a source text (page) => has to be inserted to the page manually | |
# the source text (page) corresponds to a page title (it allows few mindmaps per page) |
This file contains 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
unused=$(drush pm-list --no-core --pipe --type=module --status='not installed' | awk '{print "\x27" $1 "\x27" }' | tr "\n" ",") && drush sqlq "SELECT name, filename from system WHERE name IN (${unused%?});" > unused-modules.txt |