This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
package main | |
import ( | |
"fmt" | |
) | |
type Stack struct { | |
top *Element | |
size int | |
} |
#!/bin/bash | |
# Setup | |
# | |
# - Create a new Jenkins Job | |
# - Mark "None" for Source Control Management | |
# - Select the "Build Periodically" build trigger | |
# - configure to run as frequently as you like | |
# - Add a new "Execute Shell" build step | |
# - Paste the contents of this file as the command |
from rest_framework.parsers import JSONParser | |
from django.conf import settings | |
import re | |
import json | |
first_cap_re = re.compile('(.)([A-Z][a-z]+)') | |
all_cap_re = re.compile('([a-z0-9])([A-Z])') | |
def camel_to_underscore(name): | |
s1 = first_cap_re.sub(r'\1_\2', name) |
package main | |
import "fmt" | |
type F func(i int) int | |
func (f F) compose(inner F) F { | |
return func(i int) int { return f(inner(i)) } | |
} |
node { | |
// https://registry.hub.docker.com/_/maven/ | |
def maven32 = docker.image('maven:3.2-jdk-7-onbuild'); | |
stage 'Mirror' | |
// First make sure the slave has this image. | |
// (If you could set your registry below to mirror Docker Hub, | |
// this would be unnecessary as maven32.inside would pull the image.) | |
maven32.pull() | |
// We are pushing to a private secure docker registry in this demo. |
import jenkins.model.* | |
import hudson.remoting.Launcher | |
import hudson.slaves.SlaveComputer | |
def expectedVersion = Launcher.VERSION | |
for (computer in Jenkins.instance.getComputers()) { | |
if (! (computer instanceof SlaveComputer)) continue | |
if (!computer.getChannel()) continue | |
def version = computer.getSlaveVersion() |
- name: DO | |
hosts: localhost | |
vars: | |
project_name: "PUT A NAME FOR YOUR PROJECT HERE" | |
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens" | |
repository: "PUT YOUR REPOSITORY URL HERE" | |
tasks: | |
- name: LOCAL | Generate SSH key | |
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N "" |