docker system prune- Removes all unused images, containers, volumes etcdocker container prune- Removes all stopped containersdocker ps -a- list all containersdocker images- list all images
docker attach -it- Attach to a running container
| #!/bin/sh | |
| cd $1 #repo path | |
| git fetch -p | |
| for branch in `git for-each-ref --format='%(refname:short)' refs/remotes/origin`; | |
| do | |
| IFS='origin/' read -ra BRANCHNAME <<< "$branch" | |
| name=`awk -F"origin/" '{print $2}' <<< $branch` | |
| echo $name | |
| if [ $name != 'HEAD' ] |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"> | |
| <Document> | |
| <name>Ireland.kml</name> | |
| <Style id="s_ylw-pushpin"> | |
| <IconStyle> | |
| <scale>1.1</scale> | |
| <Icon> | |
| <href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href> | |
| </Icon> |
| import pyperclip | |
| import sys | |
| from ruamel.yaml import YAML | |
| FILE = sys.argv[1] | |
| data = [] | |
| def exists(clips, string): | |
| found = False | |
| print(string.lower()) |
| #!/usr/bin/env python | |
| """wizard.py: Generate all the ways of telling someone they are a something""" | |
| __author__ = "@shockham" | |
| import pycorpora | |
| import random | |
| from pyfiglet import figlet_format | |
| from termcolor import cprint |
| #!/bin/sh | |
| #Inspect current branch (requires local copy) | |
| gitinspector --since=1.week.ago -F html -HTlrm > <OUTPUT.HTML>" | |
| #show the diff between two (can do more) branches in a single file | |
| git diff <BRANCH_ONE> -- app/src/main <BRANCH_TWO> -- app/src/main > CHANGES.diff; | |
| #output of commits with no gitinspector requirement | |
| git log --pretty=format:"%ad:%an:%d:%B" --date=short --reverse --all --since=2.months.ago --author=<USERNAME> |
| import smtplib | |
| import sys | |
| from email.mime.multipart import MIMEMultipart | |
| from email.mime.text import MIMEText | |
| from_email = "FROM_EMAIL_HERE" | |
| from_pwd = "PWD_HERE" | |
| to_email = "TO_EMAIL_HERE" | |
| # Set up base of image |
| import os | |
| import sys | |
| import time | |
| import shutil | |
| import subprocess | |
| # ENSURE YOUR FEEDBACK FILE IS IN THE PATH SUPPLIED | |
| path = sys.argv[1] #full path should go here | |
| module_code = sys.argv[2] |
| #!/bin/bash | |
| virtualenv tenv | |
| source tenv/bin/activate | |
| sudo pip install rise | |
| jupyter nbextension enable rise --py --sys-prefix | |
| pip install -r requirements.txt | |
| pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master |
| library(MASS) | |
| library(car) | |
| makeProfilePlot <- function(list,words) { | |
| # find out the minimum and maximum values of the variables: | |
| mymin <- 1e+20 | |
| mymax <- 1e-20 | |
| for (i in 1:length(list)) { | |
| vectori <- mylist[[i]] | |
| mini <- min(vectori) |