Alpine Linux Docker Image. Win at Minimalism


README.md

CircleCI
Docker Stars
Docker Pulls
Slack
Image Size
Image Layers

A super small Docker image based on Alpine Linux. The image is only 5 MB and has access to a package repository that is much more complete than other BusyBox based images.

Why?

Docker images today are big. Usually much larger than they need to be. There are a lot of ways to make them smaller, but the Docker populace still jumps to the ubuntu base image for most projects. The size savings over ubuntu and other bases are huge:

REPOSITORY          TAG           IMAGE ID          VIRTUAL SIZE
gliderlabs/alpine   latest        157314031a17      5.03 MB
debian              latest        4d6ce913b130      84.98 MB
ubuntu              latest        b39b81afc8ca      188.3 MB
centos              latest        8efe422e6104      210 MB

There are images such as progrium/busybox which get us very close to a minimal container and package system. But these particular BusyBox builds piggyback on the OpenWRT package index which is often lacking and not tailored towards generic everyday applications. Alpine Linux has a much more complete and up to date package index:

$ docker run progrium/busybox opkg-install nodejs
Unknown package 'nodejs'.
Collected errors:
* opkg_install_cmd: Cannot install package nodejs.

$ docker run gliderlabs/alpine apk --update add nodejs
fetch http://dl-4.alpinelinux.org/alpine/v3.2/main/x86_64/APKINDEX.tar.gz
(1/5) Installing c-ares (1.10.0-r1)
(2/5) Installing libgcc (4.8.3-r0)
(3/5) Installing libstdc++ (4.8.3-r0)
(4/5) Installing libuv (0.10.29-r0)
(5/5) Installing nodejs (0.10.33-r0)
Executing busybox-1.22.1-r14.trigger
OK: 21 MiB in 20 packages

This makes Alpine Linux a great image base for utilities and even production applications. Read more about Alpine Linux here and you can see how their mantra fits in right at home with Docker images.

Usage

Stop doing this:

FROM ubuntu-debootstrap:14.04
RUN apt-get update -q 
  && DEBIAN_FRONTEND=noninteractive apt-get install -qy mysql-client 
  && apt-get clean 
  && rm -rf /var/lib/apt
ENTRYPOINT ["mysql"]

This took 19 seconds to build and yields a 164 MB image. Eww. Start doing this:

FROM gliderlabs/alpine:3.2
RUN apk --update add mysql-client
ENTRYPOINT ["mysql"]

Only 3 seconds to build and results in a 16 MB image! Hooray!

Documentation

This image is well documented. Check out the documentation at Viewdocs and the docs directory in this repository.

Contacts

We make reasonable efforts to support our work and are always happy to chat. Join us in our Slack community or submit a GitHub issue if you have a security or other general question about this Docker image. Please email security or user mailing lists if you have concerns specific to Alpine Linux.

Inspiration

The motivation for this project and modifications to mkimage.sh are highly inspired by Eivind Uggedal (uggedal) and Luis Lavena (luislavena). They have made great strides in getting Alpine Linux running as a Docker container. Check out their mini-container/base image as well.

Sponsors

Fastly

Fastly provides the CDN for our Alpine Linux package repository. This is allows super speedy package downloads from all over the globe!

License

The code in this repository, unless otherwise noted, is BSD licensed. See the LICENSE file in this repository.


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/8-V6p0u4RIM/docker-alpine

Original article

HackMyResume is a dev-friendly, local-only Swiss Army knife for resumes and CVs


README.md

Create polished résumés and CVs in multiple formats from your command line or
shell. Author in clean Markdown and JSON, export to Word, HTML, PDF, LaTeX,
plain text, and other arbitrary formats. Fight the power, save trees. Compatible
with FRESH and JRS resumes.

HackMyResume is a dev-friendly, local-only Swiss Army knife for resumes and CVs.
Use it to:

  1. Generate HTML, Markdown, LaTeX, MS Word, PDF, plain text, JSON, XML,
    YAML, print, smoke signal, carrier pigeon, and other arbitrary-format resumes
    and CVs, from a single source of truth—without violating DRY.
  2. Convert resumes between FRESH and JSON Resume formats.
  3. Validate resumes against either format.

HackMyResume is built with Node.js and runs on recent versions of OS X, Linux,
or Windows.

Features

  • OS X, Linux, and Windows.
  • Store your resume data as a durable, versionable JSON or YAML document.
  • Generate polished resumes in multiple formats without violating DRY.
  • Output to HTML, Markdown, LaTeX, PDF, MS Word, JSON, YAML, plain text, or XML.
  • Validate resumes against the FRESH or JSON Resume schema.
  • Support for multiple input and output resumes.
  • Use from your command line or desktop.
  • Free and open-source through the MIT license.

Install

Install HackMyResume with NPM:

[sudo] npm install hackmyresume -g

Note: for PDF generation you’ll need to install a copy of wkhtmltopdf for
your platform. For LaTeX generation you’ll need a valid LaTeX environment with
access to xelatex and similar.

Getting Started

To use HackMyResume you’ll need to create a valid resume in either
FRESH or JSON Resume format. Then you can start using the command
line tool. There are four basic commands you should be aware of:

  • build generates resumes in HTML, Word, Markdown, PDF, and other formats.
    Use it when you need to submit, upload, print, or email resumes in specific
    formats.

    # hackmyresume BUILD  TO  [-t THEME]
    hackmyresume BUILD resume.json TO out/resume.all
    hackmyresume BUILD r1.json r2.json TO out/rez.html out/rez.md foo/rez.all
  • new creates a new resume in FRESH or JSON Resume format.

    # hackmyresume NEW  [-f ]
    hackmyresume NEW resume.json
    hackmyresume NEW resume.json -f fresh
    hackmyresume NEW r1.json r2.json -f jrs
  • convert converts your source resume between FRESH and JSON Resume
    formats.
    Use it to convert between the two formats to take advantage of tools and
    services.

    # hackmyresume CONVERT  TO 
    hackmyresume CONVERT resume.json TO resume-jrs.json
    hackmyresume CONVERT 1.json 2.json 3.json TO out/1.json out/2.json out/3.json
  • validate validates the specified resume against either the FRESH or JSON
    Resume schema. Use it to make sure your resume data is sufficient and complete.

    # hackmyresume VALIDATE 
    hackmyresume VALIDATE resume.json
    hackmyresume VALIDATE r1.json r2.json r3.json

Supported Output Formats

HackMyResume supports these output formats:

Output Format Ext Notes
HTML .html A standard HTML 5 + CSS resume format that can be viewed in a browser, deployed to a website, etc.
Markdown .md A structured Markdown document that can be used as-is or used to generate HTML.
LaTeX .tex A structured LaTeX document (or collection of documents).
MS Word .doc A Microsoft Word office document.
Adobe Acrobat (PDF) .pdf A binary PDF document driven by an HTML theme.
plain text .txt A formatted plain text document appropriate for emails or copy-paste.
JSON .json A JSON representation of the resume.
YAML .yml A YAML representation of the resume.
RTF .rtf Forthcoming.
Textile .textile Forthcoming.
image .png, .bmp Forthcoming.

Install

HackMyResume requires a recent version of Node.js and NPM. Then:

  1. Install the latest official wkhtmltopdf binary for your platform.
  2. Optionally install an updated LaTeX environment (LaTeX resumes only).
  3. Install HackMyResume with [sudo] npm install hackmyresume -g.
  4. You’re ready to go.

Use

Assuming you’ve got a JSON-formatted resume handy, generating resumes in
different formats and combinations easy. Just run:

hackmyresume BUILD <INPUTS> <OUTPUTS> [-t theme].

Where is one or more .json resume files, separated by spaces;
is one or more destination resumes, and is the desired
theme (default to Modern). For example:

# Generate all resume formats (HTML, PDF, DOC, TXT, YML, etc.)
hackmyresume build resume.json -o out/resume.all -t modern

# Generate a specific resume format
hackmyresume build resume.json TO out/resume.html
hackmyresume build resume.json TO out/resume.pdf
hackmyresume build resume.json TO out/resume.md
hackmyresume build resume.json TO out/resume.doc
hackmyresume build resume.json TO out/resume.json
hackmyresume build resume.json TO out/resume.txt
hackmyresume build resume.json TO out/resume.yml

# Specify 2 inputs and 3 outputs
hackmyresume build in1.json in2.json TO out.html out.doc out.pdf

You should see something to the effect of:

*** HackMyResume v0.9.0 ***
Reading JSON resume: foo/resume.json
Applying MODERN Theme (7 formats)
Generating HTML resume: out/resume.html
Generating TXT resume: out/resume.txt
Generating DOC resume: out/resume.doc
Generating PDF resume: out/resume.pdf
Generating JSON resume: out/resume.json
Generating MARKDOWN resume: out/resume.md
Generating YAML resume: out/resume.yml

Advanced

Applying a theme

You can specify a predefined or custom theme via the optional -t parameter.
For a predefined theme, include the theme name. For a custom theme, include the
path to the custom theme’s folder.

hackmyresume build resume.json -t modern
hackmyresume build resume.json -t ~/foo/bar/my-custom-theme/

As of v1.0.0, available predefined themes are positive, modern, compact,
minimist, and hello-world.

Merging resumes

You can merge multiple resumes together by specifying them in order from
most generic to most specific:

# Merge specific.json onto base.json and generate all formats
hackmyresume build base.json specific.json -o resume.all

This can be useful for overriding a base (generic) resume with information from
a specific (targeted) resume. For example, you might override your generic
catch-all “software developer” resume with specific details from your targeted
“game developer” resume, or combine two partial resumes into a “complete”
resume. Merging follows conventional extend()-style behavior and there’s
no arbitrary limit to how many resumes you can merge:

hackmyresume build in1.json in2.json in3.json in4.json TO out.html out.doc
Reading JSON resume: in1.json
Reading JSON resume: in2.json
Reading JSON resume: in3.json
Reading JSON resume: in4.json
Merging in4.json onto in3.json onto in2.json onto in1.json
Generating HTML resume: out.html
Generating WORD resume: out.doc

Multiple targets

You can specify multiple output targets and HackMyResume will build them:

# Generate out1.doc, out1.pdf, and foo.txt from me.json.
hackmyresume build me.json -o out1.doc -o out1.pdf -o foo.txt

You can also omit the output file(s) and/or theme completely:

# Equivalent to "hackmyresume resume.json resume.all -t modern"
hackmyresume build resume.json

Using .all

The special .all extension tells HackMyResume to generate all supported output
formats for the given resume. For example, this…

# Generate all resume formats (HTML, PDF, DOC, TXT, etc.)
hackmyresume build me.json -o out/resume.all

..tells HackMyResume to read me.json and generate out/resume.md,
out/resume.doc, out/resume.html, out/resume.txt, out/resume.pdf, and
out/resume.json.

Validating

HackMyResume can also validate your resumes against either the FRESH /
FRESCA
or JSON Resume formats. To validate one or more existing
resumes, use the validate command:

# Validate myresume.json against either the FRESH or JSON Resume schema.
hackmyresume validate resumeA.json resumeB.json

HackMyResume will validate each specified resume in turn:

*** HackMyResume v0.9.0 ***
Validating JSON resume: resumeA.json (INVALID)
Validating JSON resume: resumeB.json (VALID)

Converting

HackMyResume can convert between the FRESH and JSON Resume
formats. Just run:

hackmyresume CONVERT <INPUTS> <OUTPUTS>

where is one or more resumes in FRESH or JSON Resume format, and
is a corresponding list of output file names. HackMyResume will
autodetect the format (FRESH or JRS) of each input resume and convert it to the
other format (JRS or FRESH).

Prettifying

HackMyResume applies js-beautify-style HTML prettification by default to
HTML-formatted resumes. To disable prettification, the --nopretty or -n flag
can be used:

hackmyresume generate resume.json out.all --nopretty

Silent Mode

Use -s or --silent to run in silent mode:

hackmyresume generate resume.json -o someFile.all -s
hackmyresume generate resume.json -o someFile.all --silent

License

MIT. Go crazy. See LICENSE.md for details.


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/dm_83eLUGwc/HackMyResume

Original article

Windmills

A couple of days ago, in the way that one does on the Internet, I stumbled into the extraordinary story of William Kamkwamba, who built a windmill from scrap and spare parts to provide electricity to his home. He was 14, living in an isolated village in a rural district of Malawi.  He worked from plans he found in a library book, Using Energy, modifying them to make use of parts and materials he could scavenge.  You can read about William here, or you can read his book, or watch his TED talk.  He has become a celebrity.  A documentary about him won the Documentary Feature Grand Jury award at SXSW in 2013.  He built a second windmill to power drip irrigation for his village, went to school at Dartmouth, and returned to his village. He continues to work on irrigation and sustainable energy production using techniques that work well in a developing country.  He has his own NGO.

It’s an inspiring story, and it showcases qualities for which I have enormous respect: intelligence, resourcefulness, practicality, and humility.  But I can’t help wondering about the rest of the story.  Does Mary Atwater, who wrote the eighth-grade science book that William used, know how much good her book has done? Did anybody send a few dollars to the library or school where he found it?  

Information is funny.  Even in print, it can end up anywhere, get used for purposes that its creators do not know about and could not anticipate. Mary Atwater was not trying to bring electricity to villages in Malawi.  Macmillan, who published the book as a science textbook for eighth-graders, surely did not have the promotion of sustainable development in Africa as part of their business plan.   The book moved quietly to Africa, and into William’s capable hands, maybe as part of an NGO-sponsored textbook-distribution project and maybe not; we don’t know.  Textbooks are undramatic; they don’t talk much,  and if you put them onstage for a TED talk they just sit there, waiting to be read, and they don’t say much about how they got there.

Here at the LII, we provide legal information to 30 million people each year, in 246 countries and territories.  Malawi is one of them. Last year we got about 1700 visits from there, mostly from people interested in the explanations of American law that you can find on our site.  And for nearly a decade, we have worked as advisors to AfricanLII, an umbrella organization that provides technology, expertise, and facilities to (among 10 or 12 others) the Malawi Legal Information Institute.   

Yet we have very few stories to tell about the individuals that we help. Many are not served directly by us, but by those who use our materials to help others — such as the UNICEF offices in Kyrgyzstan, or the AARP program that helps the elderly with their taxes, or any of the thousands of legal-aid organizations or NGOs that make use of us to find and understand the law.   Some, like MalawiLII, are helped indirectly by expertise that we share freely with others who do what we do.  It’s hard for us to put up posters with dramatic pictures and stories.  We get hints every now and then, and we can figure out some stuff from the 2 GB of logfile data we generate every day, but that’s about it.  We put the books out there, and we hope that someone will pick them up and use what they find there to some good purpose. Often, that purpose is helping somebody else.

Legal information is quiet, and a little abstract.  It is also vitally important. People who don’t have it can’t know their rights or responsibilities.  They are vulnerable to corruption. They don’t know what they must do to protect their property or to sell their products in a new and unfamiliar place. When they have it, it changes their relationship with government and with the world at large.

For 23 years we’ve been placing legal-information tools into the hands of capable and curious people.  I hope that’s something that you will want to help us with, and if you do, you can make a donation that will make those tools available to millions who will use them improve their own lives, or those of others.

As always, our thanks to those of you who have supported us in the past, and our best wishes to everyone for the holiday season.


Original URL: https://blog.law.cornell.edu/tbruce/2015/12/24/windmills/

Original article

Raspberry Pi Flavour Lets Anyone Build an Ubuntu OS for ARM Devices

Running Ubuntu Linux on Raspberry Pi hardware — and, maybe, ARM-based devices in general — has become easier thanks to a new tool called Ubuntu Pi Flavour, which is developed by the team behind Ubuntu MATE.


Original URL: http://feedproxy.google.com/~r/linuxtoday/linux/~3/PxyLGWkKmJI/raspberry-pi-flavour-lets-anyone-build-an-ubuntu-os-for-arm-devices-151223103335.html

Original article

How to set up 2 step authentication for ssh on your Linux servers

If you have ssh enabled on your Linux servers, you should consider two-step authentication a requirement. Jack Wallen shows you how to set this up.


Original URL: http://techrepublic.com.feedsportal.com/c/35463/f/670841/s/4c74202e/sc/28/l/0L0Stechrepublic0N0Carticle0Chow0Eto0Eset0Eup0E20Estep0Eauthentication0Efor0Essh0Eon0Eyour0Elinux0Eservers0C0Tftag0FRSS56d97e7/story01.htm

Original article

Mozilla jettisons everything but the browser

Mozilla has announced they will be further distancing themselves from Thunderbird. And Firefox OS is dead. Jack Wallen contemplates the fallout of Mozilla’s latest moves.


Original URL: http://techrepublic.com.feedsportal.com/c/35463/f/670841/s/4c74202d/sc/21/l/0L0Stechrepublic0N0Carticle0Cmozilla0Ejettisons0Eeverything0Ebut0Ethe0Ebrowser0C0Tftag0FRSS56d97e7/story01.htm

Original article

You can program your BB-8 using JavaScript


README.markdown

The official Orbotix JavaScript SDK module to programmatically control Sphero robots.

Build Status Code Climate Test Coverage

Usage

To initialize and connect to a BB-8 or an Ollie:

var sphero = require("sphero"),
    bb8 = sphero("F3:F2:6D:55:71:09"); // change BLE address accordingly

bb8.connect(function() {
  // roll BB-8 in a random direction, changing direction every second
  setInterval(function() {
    var direction = Math.floor(Math.random() * 360);
    bb8.roll(150, direction);
  }, 1000);
});

To initialize and connect to a Sphero 1.0/2.0 or SPRK, just change the port to match your connection:

var sphero = require("sphero"),
    orb = sphero("/dev/rfcomm0"); // change port accordingly

orb.connect(function() {
  // Sphero's connected!
  // do some cool stuff here!
});

Once connected, you can give your Sphero commands and receive notifications from the built-in sensors:

orb.connect(function() {
  // roll Sphero forward
  orb.roll(150, 0);

  // turn Sphero green
  orb.color("green");

  // have Sphero tell you when it detect collisions
  orb.detectCollisions();

  // when Sphero detects a collision, turn red for a second, then back to green
  orb.on("collision", function(data) {
    console.log("collision detected");
    console.log("  data:", data);

    orb.color("red");

    setTimeout(function() {
      orb.color("green");
    }, 1000);
  });
});

For more examples, check out the examples dir, or the JavaScript SDK documentation on the Sphero developer portal. When running these examples, don’t forget to pass the port as an ENV variable like this:

PORT=/your/port node example.js

Installation for BB-8 & Ollie

The BB-8 and Ollie use a Bluetooth Low Energy (LE) interface, also known as “Bluetooth Smart” or “Bluetooth 4.0/4.1”. You must have a hardware adapter that supports the Bluetooth 4.x+ standard to connect your computer to your BB-8 or Ollie.

Run the following command:

$ npm install sphero noble

To use Sphero.js with your BB-8 or Ollie, you must also install the Node.js noble module (https://github.com/sandeepmistry/noble) from @sandeepmistry.

Installation for Sphero 1.0/2.0 & SPRK

The Sphero 1.0/2.0 and the SPRK use a Bluetooth Classic interface, also known as “Bluetooth 2.0/3.0”.

Run the following command:

$ npm install sphero serialport

To use Sphero.js with your Sphero or SPRK, you must also install the Node.js serialport module (https://github.com/voodootikigod/node-serialport) from @voodootikigod.

Connecting to BB-8/Ollie

OS X

To connect to your BB-8 or Ollie, you first need to determine the MAC address. Once you have noble installed, you can use the advertisement-discovery.js program to determine the device address:

$ node ./node_modules/noble/examples/advertisement-discovery.js
peripheral discovered (f3f26d557108 with address , connectable true, RSSI -37:
        hello my local name is:
                BB-7108
        can I interest you in any of the following advertised services:
                ["22bb746f2ba075542d6f726568705327"]
        here is my manufacturer data:
                "3330"
        my TX power level is:
                6

Linux – Ubuntu

To connect to your BB-8 or Ollie, you first need to determine the MAC address. One way to do this, is to run the hcitool program:

$ sudo hcitool lescan

Windows

To connect to your BB-8 or Ollie, you will need to be running Windows 8.1+.

Connecting to Sphero/SPRK

OS X

To connect to your Sphero, you first need to pair it. To pair your device on OS X, open the Bluetooth settings in System Preferences > Bluetooth. From this menu, locate your Sphero in the Devices list and click the Pair button to pair it with your computer.

Once you’ve successfully paired your Sphero, open your terminal, go to your /dev folder and locate the serial device connection (or use ls -a /dev | grep tty.Sphero) for your newly paired Sphero; it should look something like tty.Sphero-RGB-AMP-SPP. Note, your device will likely be different depending on its preset color code (the three colors your Sphero cycles through when you first turn it on). The previous example is for a Sphero with a Red, Green and Blue (RGB) color code.

So, your Sphero port will be at

/dev/tty.Sphero-XXX-XXX-XXX

Linux – Ubuntu

To make things easy install Blueman Bluetooth Manager. In Ubuntu this is pretty easy, just open the Ubuntu Software Center, type the program name and install it from there. When the installation is complete, open the program and search for devices. Make sure the Sphero is flashing its color code. Once the Sphero appears in the list of devices, select it, click on setup and follow the instructions.

You can connect and disconnect the Sphero from a serialport interface by right clicking on it inside the Blueman list of devices and selecting RN-SPP or disconnect, respectively (after it has been setup and added permanently to the list). Make sure to notice the serialport address Blueman displays after the Sphero connects, as this will be the one used in your code. The serialport address displayed for the Sphero should look something like this:

/dev/rfcomm0

You might need to add a udev rule in order to properly set permissions for your program to be able to access the Bluetooth interface. For example:

$ cat /etc/udev/rules.d/55-rfcomm.rules
KERNEL=="rfcomm[0-9]*", NAME="%k", GROUP="dialout"

The udev rule above will allow any user who is a member of the dialout group to access any port that is added by connecting by running the rfcomm command. Note that running the rfcomm command itself to create the port, may require running under sudo.

Windows

Locate the Bluetooth icon in the taskbar (or inside the system task tray button) and follow the necessary steps to pair with your Sphero.

Once you’ve successfully paired your Sphero, there are two options available to you to check and see which serialport corresponds to the Sphero you just connected. The first option is to right click on the bluetooth icon in the task bar (same you use to pair), click on Open Settings, when the settings window appears, navigate to the COM Ports tab where you should see a list of ports which should list your Sphero. If your Sphero is listed in more than one port, take note of the one that has RN-SPP in the name, and use that one to connect. The list should look something similar to:

Port Direction Name
COM3 Outgoing Sphero-RPB ‘RN-SPP’
COM4 Incoming Sphero-RPB

In the above case, you should use serialport COM3.

The second option is to identify the port number. Click the start button and type device manager. Once the program appears in the list, open it. Navigate the tree of devices to Ports, there you should see a list of COM ports, i.e. (COM3, COM4). From that port list, select the one that belongs to your Sphero. If your Sphero name is not listed in the ports list, you can either try them one by one or use the first method to identify which port belongs to your Sphero. The port address should look something like:

COM2, COM3, COM4

Error handling

Under most circumstances, Sphero.js will attempt to gracefully recover from any bad or incomplete packets that might be received back from the connected wireless device. If you wish to handle these errors yourself, you must set the emitPacketErrors option to true, as shown by this example:

var sphero = require("sphero"),
    orb = sphero("/dev/rfcomm0", {emitPacketErrors: true});

orb.connect(function() {
  // Sphero's connected!
  // do some cool stuff here!
  orb.on("error", function(err, data) {
    // Do something with the err or just ignore.
  });
});

Compatibility

The Sphero.js module is currently compatible with Node.js versions 0.10.x thru 5.x

In order to install it with Node.js 5.x+, you will need to have g++ v4.8 or higher.

Development

Use npm install to install development dependencies. You will also need to install Grunt by running npm install -g grunt-cli

You can then run tests with grunt test.

Use grunt lint to run ESLint against both lib and spec/lib.

The grunt command by itself will run both of the above tasks.

License

Copyright (c) 2015 Orbotix.
MIT Licensed.
For more details, see the LICENSE file.


Original URL: http://feedproxy.google.com/~r/feedsapi/BwPx/~3/guT20Thg1XQ/sphero.js

Original article

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

%d bloggers like this: