Hint: it's not different than running it under ubuntu without Windows.
sudo apt install postgresql-common
sudo sh /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh| 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. |
| # Delete all redundant git branches | |
| # 1. `git branch` lists all the branches | |
| # 2. `xargs -L1` consumes the pipe output one line at a time, feeding it as an an arg to the target command | |
| # 3. `git branch -d` deletes the branches that are redundant (already merged). | |
| # Note: this print results for each branch, either | |
| # saying it's deleted or that you need to use -D to delete it because it's not redundant. | |
| git branch | xargs -L1 git branch -d |
| export PATH="$PATH:/Users/doug/projects/flutter/bin" # Point to your downloaded flutter executable | |
| # export CHROME_EXECUTABLE=/Applications/Brave\ Browser.app/Contents/MacOS/Brave\ Browser # Point to your chromium executable |
| # place this snippet into init.coffee in ~/.atom directory | |
| atom.workspace.observeTextEditors (editor) -> | |
| if editor.getTitle() isnt "untitled" | |
| sp = editor.getPath().split('/') | |
| title = sp.slice(sp.length-2).join('/') | |
| editor.getTitle = -> title | |
| editor.getLongTitle = -> title | |
| for item in atom.workspace.getPaneItems() |
| import boto3 | |
| s3 = boto3.resource('s3') | |
| bucket = s3.Bucket('my-bucket-name') | |
| bucket.object_versions.filter(Prefix='my/key/prefix').delete() |
| #!/bin/bash | |
| DIR="/home/doug/Pictures/rotate_background" | |
| # Get full path | |
| FULL_PATH=$(gsettings get org.gnome.desktop.background picture-uri) | |
| # Clean off quotes. | |
| FULL_PATH=$(echo $FULL_PATH | sed 's/.$//' | sed 's/^.//') |