gitflow | git |
---|---|
git flow init |
git init |
git commit --allow-empty -m "Initial commit" |
|
git checkout -b develop master |
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
# watch a file changes in the current directory, | |
# execute all tests when a file is changed or renamed | |
$watcher = New-Object System.IO.FileSystemWatcher | |
$watcher.Path = get-location | |
$watcher.IncludeSubdirectories = $true | |
$watcher.EnableRaisingEvents = $false | |
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName | |
while($TRUE){ |
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
# Start the old vagrant | |
$ vagrant init centos-6.3 | |
$ vagrant up | |
# You should see a message like: | |
# [default] The guest additions on this VM do not match the install version of | |
# VirtualBox! This may cause things such as forwarded ports, shared | |
# folders, and more to not work properly. If any of those things fail on | |
# this machine, please update the guest additions and repackage the | |
# box. |
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/env jjs | |
/*#################################################################################################################################### | |
# As Nashorn does not have http capabilities through XMLHttpRequest (DOM API), we have to use regular Java classes instead. | |
# This sample shows how this can be acheived without depending on any third party libraries. Just a standard Java 8 JDK. | |
# Make sure to have JAVA_HOME/bin on your PATH for the shebang to work. Then just chmod +x away and run... | |
# Alternatively if you're on a non *nix OS, start with jjs -scritping httpsample.js | |
####################################################################################################################################*/ | |
var url = "https://api.github.com/users/billybong/repos"; | |
var response; |
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
param( [string]$file = $(throw "file is required"), $matchesPerSplit = 50, $maxFiles = [Int32]::MaxValue, $splitOnNode = $(throw "splitOnNode is required"), $offset = 0 ) | |
# with a little help of https://gist.github.com/awayken/5861923 | |
$ErrorActionPreference = "Stop"; | |
trap { | |
$ErrorActionPreference = "Continue" | |
write-error "Script failed: $_ \r\n $($_.ScriptStackTrace)" | |
exit (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
version: '2' | |
services: | |
postgres: | |
image: postgres:9.5 | |
restart: always | |
environment: | |
- "POSTGRES_USER=${POSTGRES_USER}" | |
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}" | |
- "POSTGRES_DB=gogs" | |
volumes: |
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
#!/bin/bash | |
mkdir -p out | |
for img in `grep image $1| sed -e 's/^.*image\: //g'`; | |
do | |
cleanname=${img/\//-} | |
tag=`docker images | grep $img | awk '{print $2}'` | |
echo "Exporting image: $img, tag:$tag ($cleanname)..." | |
docker save $img -o out/$cleanname.tar |
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
#lowercase letters/numbers only | |
-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_}) | |
# all characters | |
-join ((33..126) | Get-Random -Count 32 | % {[char]$_}) |
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
#!/bin/bash | |
# create custom bootable iso for CentOS 7 with kickstart | |
if [ $# -lt 2 ] | |
then | |
echo "Usage1: $0 path2iso path2kickstart" | |
exit 1 | |
else | |
if [ ! -f $1 ] | |
then |
OlderNewer