This file contains hidden or 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
| machine github.com | |
| login [YOUR_GITHUB_USERNAME] | |
| password [YOUR_GITHUB_TOKEN] |
This file contains hidden or 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
| stage('Git Push To Origin') { | |
| steps { | |
| withCredentials([usernamePassword(credentialsId: your_credentials, passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { | |
| sh "git tag ${your_tag}" | |
| sh "git push https://${GIT_USERNAME}:${GIT_PASSWORD}@${repository} ${your_tag}" | |
| } |
This file contains hidden or 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
| node { | |
| def msg | |
| stage ('read post var from webhook') { | |
| echo 'Hello World webhook' | |
| echo 'action :' + action | |
| def repository = readJSON text: repository; | |
| def pull_request = readJSON text: pull_request; | |
| def title = pull_request.title.replaceAll(" ","-") | |
| if (action == "submitted") { | |
| msg = 'New pull request on ' + repository.name + '%0ATitle: ' + title + '%0ABranch: ' + pull_request.head.ref + ' -> ' + pull_request.base.ref + '%0ABy: ' + pull_request.user.login + '%0A%0A' + pull_request.html_url |
This file contains hidden or 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
| #!/bin/bash | |
| IFS=$'\n\t' | |
| set -eou pipefail | |
| if [[ "$#" -ne 2 || "${1}" == '-h' || "${1}" == '--help' ]]; then | |
| cat >&2 <<"EOF" | |
| gcrgc.sh cleans up tagged or untagged images pushed before specified date | |
| for a given repository (an image name without a tag/digest). |
This file contains hidden or 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
| var fs = require('fs') | |
| var obj | |
| fs.readFile('test.json', 'utf8', function (err, data) { | |
| if (err) throw err | |
| obj = JSON.parse(data) | |
| var keys = Object.keys(obj) | |
| for (var i = 0; i < keys.length; i++) { | |
| if(obj[keys[i]] == "[object Object]") { | |
| obj[keys[i]] = JSON.stringify(obj[keys[i]], null, 4) | |
| } |
This file contains hidden or 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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "window.zoomLevel": 0, | |
| "workbench.statusBar.visible": true, | |
| // "diffEditor.ignoreTrimWhitespace": false, | |
| "editor.fontSize": 13, | |
| "window.nativeTabs": false, | |
| "editor.renderIndentGuides": true, | |
| "workbench.activityBar.visible": false, | |
| "workbench.iconTheme": "vs-seti", |
This file contains hidden or 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
| $code = '100005'; | |
| $bin = hex2bin(str_repeat('0', 8 - strlen($code)) . $code); | |
| $emoticon = mb_convert_encoding($bin, 'UTF-8', 'UTF-32BE'); |
This file contains hidden or 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
| brew update | |
| brew upgrade | |
| brew tap josegonzalez/homebrew-php | |
| brew install php70-mcrypt | |
| php --version // To Test your php | |
| sudo composer update |
This file contains hidden or 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
| SERVICE=sample | |
| COMMIT_SHA=$(shell git rev-parse HEAD) | |
| PWD:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) | |
| default: | |
| # `make prod` - build and deploy to prod | |
| # `make stag` - build and deploy to stag | |
| prod: | |
| NAMESPACE=production make deploy |
This file contains hidden or 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
| export GOPATH="${PWD}" | |
| { | |
| "go.gopath": "${workspaceRoot}" | |
| } |