Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| [1][default:/src:0]# build | |
| : Loading /src/plan.sh | |
| mytutorialapp: Plan loaded | |
| mytutorialapp: hab-plan-build setup | |
| mytutorialapp: Using HAB_BIN=/hab/pkgs/core/hab/0.7.0/20160614230104/bin/hab for installs, signing, and hashing | |
| mytutorialapp: Resolving dependencies | |
| » Installing core/node | |
| → Using core/gcc-libs/5.2.0/20160612075020 | |
| → Using core/glibc/2.22/20160612063629 | |
| → Using core/linux-headers/4.3/20160612063537 |
| node{ | |
| /* Import meta */ | |
| def DEV_USER = "XXXX" | |
| def PROD_USER = "XXXX" | |
| def DEV_HOST = "XXXX" | |
| def PROD_HOST = "XXXX" | |
| def DEV_DB_NAME = "XXXX" |
| BUG! exception in phase 'semantic analysis' in source unit 'WorkflowScript' The lookup for utility.Commands caused a failed compilaton. There should not have been any compilation from this call. | |
| at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:190) | |
| at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:170) | |
| at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:126) | |
| at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:676) | |
| at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:308) | |
| at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:276) | |
| at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:260) | |
| at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:272) | |
| at org.codehaus.groovy.control.ResolveVisitor.transformConstructorCallExpression(ResolveVisitor.java:1047) |
| node{ | |
| def u = new utility.Commands() | |
| u.slackStart("jenkins") | |
| def err = null | |
| currentBuild.result = "SUCCESS" | |
| try { | |
| stage('Create new EMT job'){ |
| import groovy.sql.Sql | |
| def db = "jenkins" | |
| def user = "jenkins_user" | |
| def pwd = "xxxxxxxx" | |
| def sql = Sql.newInstance( | |
| "jdbc:mysql://localhost:3306/${db}", | |
| "${user}", | |
| "${pwd}", |
| def myFolderName = "xxxxxxxxxxxxxx" | |
| def mySlug = "xxxxxxxxxxxxxx" | |
| def myDisplayName = "xxxxxxxxxxxxxx" | |
| // Ensure plugin directory exists so the job dsls succeed | |
| folder("platform/themes/${myFolderName}") { | |
| displayName("${myDisplayName}") | |
| } | |
| pipelineJob("platform/themes/${myFolderName}/branch-builder") { |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| <?php | |
| // This can be found in the Symfony\Component\HttpFoundation\Response class | |
| const HTTP_CONTINUE = 100; | |
| const HTTP_SWITCHING_PROTOCOLS = 101; | |
| const HTTP_PROCESSING = 102; // RFC2518 | |
| const HTTP_OK = 200; | |
| const HTTP_CREATED = 201; | |
| const HTTP_ACCEPTED = 202; |
| #! /usr/bin/env bash | |
| # Install Homebrew | |
| ## Homebrew prereq | |
| xcode-select --install | |
| ## Install Homebrew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
| #!/bin/bash | |
| echo "Average php-fpm process memory usage:" | |
| PHPFPM="php-fpm" # it could be just php-fpm or php-fpm-X.X (eg. php-fpm-7.1) depending on configuration | |
| AVG=$(ps --no-headers -o "rss,cmd" -C $PHPFPM | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }') | |
| QTY=$(ps -ylC $PHPFPM --sort:rss | tail -n +2 | wc -l) | |
| echo "$AVG on $QTY processes" | |
| exit 0 |