Skip to content

Instantly share code, notes, and snippets.

View py404's full-sized avatar

Phani Atmakur py404

View GitHub Profile
@Ardemius
Ardemius / start-sandbox-hdp-standalone_2-6-4.ps1
Created February 26, 2018 10:11
Corrected version the Hortonworks sandbox start AND RESTART script (start-sandbox-hdp-standalone_2-6-4.ps1)
Write-Host "Checking docker daemon..."
If ((Get-Process | Select-String docker) -ne $null) {
Write-Host "Docker is up and running"
}
Else {
$Host.UI.WriteErrorLine("Please start Docker service. https://docs.docker.com/docker-for-windows/")
return
}
If ((docker images | Select-String sandbox-hdp-standalone) -ne $null) {
@dhbradshaw
dhbradshaw / gist:e2bdeb502b0d0d2acced
Last active August 16, 2023 17:50
Rename field using migrations in django 1.7
To change a field name in django 1.7+
1. Edit the field name in the model (but remember the old field name: you need it for step 3!)
2. Create an empty migration
$ python manage.py makemigrations --empty myApp
3. Edit the empty migration (it's in the migrations folder in your app folder, and will be the most recent migration) by adding
migrations.RenameField('MyModel', 'old_field_name', 'new_field_name'),
to the operations list.