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
set -eux | |
sudo apt -y upgrade | |
# Install docker | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge test" | |
sudo apt-get update | |
apt-cache policy docker-ce | |
sudo apt-get install -y docker-ce |
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
### Keybase proof | |
I hereby claim: | |
* I am sawadashota on github. | |
* I am sawadashota (https://keybase.io/sawadashota) on keybase. | |
* I have a public key ASBU1eDKmk3XUqwNQGXK1TXEOMUqiqwb4393zF3_pbNnoQo | |
To claim this, I am signing this object: |
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
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'usename'; | |
const authPass = 'pass'; |
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
import org.scalatest._ | |
class ScalaTest extends WordSpecLike with MustMatchers { | |
"Title" must { | |
"description" in { | |
assert(true) | |
} | |
} | |
} |
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
# Please set env | |
# OWNER : Docker Hub owner | |
# IMAGE_NAME : Docker Hub image name | |
# DOCKER_USER : Username for login Docker Hub | |
# DOCKER_PASS : Password for login Docker Hub | |
alias: | |
default_env: &default_env | |
docker: | |
- image: circleci/golang:1.9.3 |
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
#!/usr/bin/env bash | |
set -eux | |
if [ $# -ne 6 ]; then | |
echo "Invalid args" | |
echo "./codedeploy.sh [APPLICATION_NAME] [DEPLOYMENT_GROUP] [S3_BUCKET] [S3_REGION] [S3_KEY] [SOURCE]" | |
exit 1 | |
fi |
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
#!/usr/bin/env bash | |
set -eux | |
if [ $# -ne 5 ]; then | |
echo "Invalid args" | |
echo "./github_assets.sh [GITHUB_ACCESS_TOKEN] [USERNAME] [REPO_NAME] [TAG_NAME]" | |
exit 1 | |
fi |
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
void echo(char * s) { | |
int length = sizeof(s); | |
for(int i = 0; i < length - 1; i++) { | |
printf("%c", s[i]); | |
} | |
printf("\n"); | |
} |
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
cat /var/log/httpd/access_log | grep -F '18/Dec/2017:15:10' | awk -F' ' '{printf "%-15s %s %s %-5s %s %s %-30s %s\n", $1, $4, $5, $6, $8, $9, $7, $11}' |
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
<?php | |
interface aInterface | |
{ | |
public function a(); | |
} | |
interface bInterface extends aInterface | |
{ | |
public function b(); |
NewerOlder