Stop Docker Service
rdocker-cli.rb restart_docker_service IP
Copy all the things!
#include <cstdint> | |
#include <arpa/inet.h> | |
/** Returns the IPv4 broadcast address for a given subnet. | |
* | |
* Assuming host is little endian. | |
* Assuming your host is Linux :) | |
* | |
* subtracting 1 from the return will yield last usable host address. | |
* |
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
require 'minitest/mock' | |
require 'minitest/unit' | |
require 'date' | |
MiniTest::Unit.autorun | |
class TestMailPurge < MiniTest::Unit::TestCase | |
class MailPurge | |
def initialize(imap) | |
@imap = imap |
### Keybase proof | |
I hereby claim: | |
* I am tetheredge on github. | |
* I am tetheredge (https://keybase.io/tetheredge) on keybase. | |
* I have a public key whose fingerprint is 2B03 2BC9 CC44 7BF9 EE83 64CB C03E FDA1 F1B6 FABB | |
To claim this, I am signing this object: |
Practical documentation on how to create a new base image.
First we'll want to identify what image we are going to use as our base image to modify is.
In this example our previous base image is old-oca-bastion
.
We have been tasked with doing the following:
This is a basic step by step intro to working with Docker containers and Images. You should be able to follow along with your installation of docker, but be sure to change IDs/naming schemes according to your use case.
The goal of this exercise is to create a base image from the ubuntu base image that has both the jre and htop installed.
docker run -t -i ubuntu /bin/bash
package main | |
import ( | |
"flag" | |
"fmt" | |
"os" | |
) | |
func main() { | |
askCommand := flag.NewFlagSet("ask", flag.ExitOnError) |
type Nvd struct { | |
Title string `xml:"nvd"` | |
} | |
type Entry struct { | |
XMLName xml.Name `xml:"entry"` | |
Type string `xml:"type,attr"` | |
Name string `xml:"name,attr"` | |
Sequence string `xml:"seq,attr"` | |
Published string `xml:"published,attr"` |
func SetupDb(user, password, host, dbName string) (*sql.DB, error) { | |
if host == "locahost" || host == "127.0.0.1" { | |
host = "" | |
} | |
d, err := sql.Open("mysql", user+":"+password+"@tcp("+host+":3306)/"+dbName) | |
if err != nil { | |
return nil, err | |
} | |
return d, nil |