Skip to content

Instantly share code, notes, and snippets.

so0k so0k

Block or report user

Report or block so0k

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@so0k
so0k / mountG.bat
Last active Aug 29, 2015
mount g drive - depends Set-localdocker.bat
View mountG.bat
@ECHO OFF
Set-localdocker.bat
IF EXIST G: (
ECHO Removing existing G: mapping...
net use G: /d
)
ECHO Mapping G: to "\\localdocker\data" ...
NET USE G: \\localdocker\data
View Add-Hosts.ps1
Param(
[Parameter(Mandatory=$true)]
[string]$hostName,
[Parameter(Mandatory=$true)]
[string]$hostIp
)
function IsAdministrator
{
$Identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
View Update-Hosts.ps1
Param(
[Parameter(Mandatory=$true)]
[string]$hostName,
[Parameter(Mandatory=$true)]
[string]$hostIp
)
function IsAdministrator
{
$Identity = [System.Security.Principal.WindowsIdentity]::GetCurrent()
@so0k
so0k / syncG.bat
Created Aug 15, 2014
this file has been replaced by powershell script
View syncG.bat
@ECHO OFF
SET LOCAL_DATA_DIR=%CD%
SET REMOTE_SUB_DIR=golfconnect-docker
IF EXIST G:\%REMOTE_SUB_DIR% (
echo %REMOTE_SUB_DIR% exists - should prompt for clear
) ELSE (
mkdir G:\%REMOTE_SUB_DIR%
)
@so0k
so0k / Connect-Boot2Docker.ps1
Created Aug 21, 2014
open a boot2docker ssh console from powershell
View Connect-Boot2Docker.ps1
#connect b2d ssh
start cmd -ArgumentList @('/C','boot2docker','ssh')
@so0k
so0k / Set-localdocker.bat
Created Aug 22, 2014
CMD Batch that gets the boot2docker ip and updates the host file - powershell can't handle boot2docker ip command... Depends on Update-Hosts / Add-Hosts powershell scripts
View Set-localdocker.bat
@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%\""
@so0k
so0k / demo-env.sh
Last active Aug 29, 2015
demoapp Docker environment - python & nodejs command line interface containers
View demo-env.sh
#!/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
View ghost container
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
@so0k
so0k / Parse.ps1
Last active Aug 29, 2015
Read csv, parse HTML contained in csv field & return div elements of specific class exported as new csv
View Parse.ps1
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
@so0k
so0k / eraser\chat.db
Last active Oct 1, 2015
counter-strike [POD] and quake 2 [ERASER] bot chat
View eraser\chat.db
# Eraser Bot chat data
#
# Thanks to Meanstryk for the additions
# -> http://www.planetquake.com/ramshackle
# Also thanks to Shawn "Benighted1" Lisk for more additions
# -> kclisk@bright.net
#
# OK, here's the deal. Bot's can say one of the following things:
#
# 1. Greetings
You can’t perform that action at this time.