- Related tutorial: http://raspberrypiguide.de/
- Command Line Cheatsheet: https://gist.github.com/hofmannsven/8392477
| __author__ = 'schwa' | |
| import os | |
| import subprocess | |
| import glob | |
| from github import Github # pip install PyGithub | |
| from bitbucket.bitbucket import Bitbucket # pip install --user bitbucket-api | |
| GH_USERNAME = 'jwight@mac.com' | |
| GH_PASSWORD = '1234' |
| #!/bin/bash | |
| repos="my-repo1 | |
| my-repo2 | |
| my-repo3" | |
| # Git A source can be github, gitlab | |
| GIT_A='gitlab.com' | |
| GIT_A_ORGANIZATION='miahou' |
I've seen it asked a couple of times in #gitlab on freenode about upgrading GitLab and what is a good method or recommended method. While GitLab HQ does not recommend a specific workflow for their upgrades I am here to introduce you to my work flow. Feel free to use it or adapt it to your own style. Please note I wrote the majority of this around GitLab 6.0 but GitLab 6.2 is currently released. This will likely apply to any future GitLab release if they stick to the same model of releasing via SCM.
If you'd like to follow other stuff I write about randomly I have a LinuxQuestions.org blog under the user sag47 or you can look at my recent posts on LinuxQuestions.org by doing an advanced search and search by user name. I try to make them all informative.
A GitLab major version is released on the 22nd of each month. Each release has it's own upgrad
| #!/usr/bin/env python | |
| import sqlite3 | |
| class dbopen(object): | |
| """ | |
| Simple CM for sqlite3 databases. Commits everything at exit. | |
| """ | |
| def __init__(self, path): | |
| self.path = path |
| # first: mkdir user && cd user && cp /path/to/get_gists.py . | |
| # python3 get_gists.py user | |
| import requests | |
| import sys | |
| from subprocess import call | |
| user = sys.argv[1] | |
| r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
| CONTREPO=https://repo.continuum.io/archive/ | |
| # Stepwise filtering of the html at $CONTREPO | |
| # Get the topmost line that matches our requirements, extract the file name. | |
| ANACONDAURL=$(wget -q -O - $CONTREPO index.html | grep "Anaconda3-" | grep "Linux" | grep "86_64" | head -n 1 | cut -d \" -f 2) | |
| wget -O ~/Downloads/anaconda.sh $CONTREPO$ANACONDAURL | |
| bash ~/Downloads/anaconda.sh |
| #!/bin/bash | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root" | |
| exit 1 | |
| else | |
| #Update and Upgrade | |
| echo "Updating and Upgrading" | |
| apt-get update && sudo apt-get upgrade -y |
| # Copyright (c) 2015 Jim Rybarski | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: | |
| # The above copyright notice and this permission notice shall be included in |
| #!/bin/bash | |
| # installation jetbrains | |
| j_url="https://data.services.jetbrains.com/products/download" | |
| tmp_dir="$HOME/tmp_jb" | |
| install_dir="/opt" | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root." | |
| exit 1 | |
| fi |