This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: http://alexeytorkhov.blogspot.co.uk/2009/09/mounting-raw-and-qcow2-vm-disk-images.html | |
| losetup /dev/loop0 image.img | |
| kpartx -a /dev/loop0 | |
| mount /dev/mapper/loop0p1 /mnt/image | |
| # If kernel parameter (as loop in compiled into Fedora’s kernel) like loop.max_part=63 added it is even simplier: | |
| losetup /dev/loop0 image.img | |
| mount /dev/loop0p1 /mnt/image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ##### | |
| # | |
| # A script that runs wordcount mapreduce application on Apache Hadoop 1.x. | |
| # The input file are files in the "<HOME>/conf" directory. | |
| # | |
| ##### | |
| ./bin/hadoop dfs -mkdir /input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -c 'import crypt; print crypt.crypt("password", "random_salt")' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lang en_US | |
| langsupport en_US | |
| keyboard us | |
| timezone Etc/UTC | |
| text | |
| install | |
| skipx | |
| halt | |
| # Ridiculous URL... I know... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## install required packages | |
| sudo apt-get -y update | |
| sudo apt-get upgrade -y | |
| sudo apt-get install -y build-essential libssl-dev zlib1g-dev libreadline6-dev libyaml-dev git mercurial | |
| ## downward and install ruby-2.1.2 | |
| cd /tmp | |
| wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| # Install OCaml and OPAM inside a Cloud9 IDE workspace. | |
| # Run this script inside the workspace terminal, then eval $(opam config env) | |
| OCAML_URL=http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-4.01.0.tar.gz | |
| # create a scratch directory | |
| D=$(mktemp --tmpdir -d c9-ocaml-XXX) | |
| pushd $D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| language: c | |
| script: bash -ex .travis-ci.sh | |
| branches: | |
| only: | |
| - master | |
| env: | |
| - OCAML_VERSION=4.01.0 OPAM_VERSION=1.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ####################################### | |
| # | |
| # Bash script file for travis-ci.org. | |
| # | |
| ####################################### | |
| OPAM_DEPENDS="ocamlfind yojson" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruby -e "require 'json'; puts (JSON.pretty_generate JSON.parse(STDIN.read))" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruby -e "require 'yaml'; puts ((YAML.load(STDIN.read)).to_yaml)" |