This file contains 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
# Put this in your ~/.bash_profile | |
# Git command and tag/branch completion as well as putting the branch | |
# in your prompt including a "*" if it is dirty (changed) | |
. /usr/local/etc/bash_completion.d/git-completion.bash | |
export GIT_PS1_SHOWDIRTYSTATE=true | |
export PS1='\u@\h \[\033[1;33m\]\W\[\033[0m\]$(__git_ps1 "[%s]")\$ ' |
This file contains 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
UPDATE users | |
SET name = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r)) | |
WHERE uid > 1; | |
UPDATE users | |
SET mail = CONCAT('user', (select @rownum:=@rownum+1 rownum FROM (SELECT @rownum:=0) r), '@example.com') | |
WHERE uid > 1; | |
UPDATE users | |
SET pass = '$S$DR.ROS3sDma71iTWcofZszOb8dMqrPi3PUWWNNc3rIwcG4ikL2gS' |
This file contains 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
package example | |
import common._ | |
import java.util.NoSuchElementException | |
object Lists { | |
/** | |
* This method computes the sum of all elements in the list xs. There are | |
* multiple techniques that can be used for implementing this method, and | |
* you will learn during the class. |
This file contains 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
1) cp /usr/lib/coreos/resize_state ~/fusion_resize_state | |
2) Remove the check "if sgdisk -v "$DISK_DEVNAME" | grep -q "^Problem: The secondary header"; then" | |
3) sudo -s | |
4) ./fusion_resize_state /dev/disk/by-label/STATE | |
5) Restart | |
6) ./fusion_resize_state /dev/disk/by-label/STATE | |
7) resize2fs /dev/sda9 | |
... | |
??? | |
... |
This file contains 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
FROM centos:centos7 | |
# Install our yum wrapper. | |
ADD root / | |
# Install base packages. | |
RUN yum -y install epel-release && \ | |
yum -y update && \ | |
yum -y install sudo ssh curl less vim-minimal dnsutils |
This file contains 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
✘ ~/Projects/phase2-aws/packer master ● packer build ami-build.json | |
east-ami output will be in this color. | |
==> east-ami: Prevalidating AMI Name... | |
==> east-ami: Inspecting the source AMI... | |
==> east-ami: Creating temporary keypair: packer 57a289b7-8f72-eaff-848d-de9e0450259f | |
==> east-ami: Launching a source AWS instance... | |
east-ami: Instance ID: i-14391784 | |
==> east-ami: Waiting for instance (i-14391784) to become ready... | |
==> east-ami: Waiting for SSH to become available... |
This file contains 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
~/Projects/phase2-aws/packer master ● packer build ami-build.json | |
east-ami output will be in this color. | |
==> east-ami: Prevalidating AMI Name... | |
==> east-ami: Inspecting the source AMI... | |
==> east-ami: Creating temporary keypair: packer 57a37e8a-1e93-f36a-7b65-b3fbecb1a987 | |
==> east-ami: Launching a source AWS instance... | |
east-ami: Instance ID: i-0c22099c | |
==> east-ami: Waiting for instance (i-0c22099c) to become ready... | |
==> east-ami: Waiting for SSH to become available... |
This file contains 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
function lintJson() { | |
return gulp.src('*.theme.json') | |
.pipe(jsonlint()) | |
.pipe(jsonlint.reporter()); | |
} | |
gulp.task('validate:json', 'Test JSON', function() { | |
return lintJson().pipe(jsonlint.failAfterError()); | |
}); | |
tasks.validate.push('validate:json'); |
This file contains 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
// Setup the linting | |
function lintJson() { | |
return gulp.src('*.theme.json') | |
.pipe(jsonlint()) | |
.pipe(jsonlint.reporter()); | |
} | |
// Add a validate task that will fail on lint error | |
gulp.task('validate:json', 'Test JSON', function() { | |
return lintJson().pipe(jsonlint.failAfterError()); |
This file contains 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
https://gist.github.com/690800e4e5d24cdb95440be8cf168548 |
OlderNewer