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
function getS3Config() { | |
return Restangular.one(URLS.GET_S3_CONFIG).get(); | |
} | |
//function with s3Config & angular $upload module injected | |
$upload.upload({ | |
url: protocol + '://' + s3config.bucket + '/', | |
method: method.POST, | |
data: { | |
'key': funcs[i], |
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
Function Get-FileName { | |
[System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") | Out-Null | |
$OpenFileDialog = New-Object System.Windows.Forms.OpenFileDialog | |
$OpenFileDialog.initialDirectory = $initialDirectory | |
$OpenFileDialog.filter = "Comma Separated files (*.csv)| *.csv" | |
$OpenFileDialog.ShowDialog() | Out-Null | |
$OpenFileDialog.filename | |
} | |
$Input = Get-FileName |
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 | |
APPNAME=<%= appName %> | |
APP_PATH=/opt/$APPNAME | |
BUNDLE_PATH=$APP_PATH/current | |
ENV_FILE=$APP_PATH/config/env.list | |
PORT=<%= port %> | |
USE_LOCAL_MONGO=<%= useLocalMongo? "1" : "0" %> | |
# remove previous version of the app, if exists |
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
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$True,Position=1)] | |
$Filter=".*", | |
#TODO: handle https & no basic auth as well.. | |
$RegistryEndpoint = "registry.mysite.com", | |
$UserName = "user", | |
$Password = "password" | |
) |
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
[Unit] | |
Description=Turn on swap | |
[Service] | |
Type=oneshot | |
Environment="SWAPFILE=/4GiB.swap" | |
RemainAfterExit=true | |
ExecStartPre=/usr/bin/touch ${SWAPFILE} | |
ExecStartPre=/usr/bin/chattr -C ${SWAPFILE} | |
ExecStartPre=/usr/bin/fallocate -l 4096m ${SWAPFILE} |
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
CoreOS alpha (745.1.0) | |
core@kalimdor ~ $ docker ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
bde18d705b86 sameersbn/gitlab:7.12.2-2 "/sbin/entrypoint.sh 6 days ago Up 26 seconds 443/tcp, 0.0.0.0:10022->22/tcp, 0.0.0.0:10080->80/tcp gitlab | |
42b5896ee45e registry:2 "registry cmd/regist 3 weeks ago Up 29 seconds 0.0.0.0:5000->5000/tcp registry | |
eb05cf6fd7ec redis:3 "/entrypoint.sh redi 5 weeks ago Exited (0) 4 weeks ago dev-redis | |
4bb6c15f0b1c sameersbn/redmine:2.6.1 "/app/init app:start 3 months ago Up 26 seconds 443/tcp, 0.0.0.0:11080->80/tcp redmine | |
67d683ac603d nginx:latest "nginx -g 'daemon |
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
#This gist expects msys git installed in path ${env:ProgramFiles(x86)}\Git\ | |
$title = "Create CoreOS Docker host for Hyper-V" | |
$message = "Are you sure you want to start the setup for CoreOS, please ensure msys git has been installed first?" | |
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", ` | |
"Confirm msys git is installed and it is safe to proceed with setup." | |
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", ` | |
"Cancel setup." | |
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no) | |
$result = $host.ui.PromptForChoice($title, $message, $options, 0) | |
switch ($result) |
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 | |
#this is old, do not use, use docker-compose instead | |
#demoapp env management script | |
#based on andreagrandi/glowmachine sample | |
#this script assumes it is running in the project folder | |
#under the data directory created by this boot2docker setup script: | |
#https://gist.github.com/so0k/d4f5e485a81ca5768643 |
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
@ECHO OFF | |
ECHO Getting boot2docker ip... | |
FOR /f "usebackq tokens=*" %%a IN (`boot2docker ip`) DO SET localdocker-ip=%%a | |
ECHO %localdocker-ip% | |
ECHO. | |
ECHO Analyzing hosts file | |
%windir%\System32\FIND /C /I "localdocker" %windir%\System32\drivers\etc\hosts | |
IF %ERRORLEVEL% NEQ 0 ( | |
ECHO localdocker not found, adding to hosts... | |
powershell -command "Add-Hosts.ps1 -hostName \"localdocker\" -hostIp \"%localdocker-ip%\"" |
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( | |
[switch]$keepalive | |
) | |
#region script config | |
$dockerhost = "localdocker" | |
$User = "docker" | |
$PWord = (new-object System.Security.SecureString) #this is how you define blank password | |
$keyfile = "C:\Path\To\keys" | |
#endregion |