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 -x | |
sudo yum -y install yum-utils | |
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm | |
sudo yum -y install python35u | |
sudo yum -y install python35u-pip | |
sudo yum -y install python35u-devel | |
sudo yum -y install python35u-tools | |
sudo yum -y install openssl-devel |
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
var request = require('request'); | |
request('https://0n2i23kb6f.execute-api.us-east-1.amazonaws.com/dev/mydemoresource', function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
console.log(body) // Show the HTML | |
} | |
}) |
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 +x | |
git archive --format=tar --remote=ssh://[email protected]:7999/test/tools.git HEAD:cloud_gen | gzip >tools-1.4.0.tar.gz | |
git archive --format=tar --remote=ssh://[email protected]:7999/test/mobile-app.git --prefix=scripts/ HEAD:mobile-app/Scripts/Build-Phases | gzip >test.gz | |
# lets you add currently staged changes to your last commit. | |
# Exclude the --no-edit option and Git will prompt if you wish to change commit message. | |
# This command comes in very handy for those cases when you find out that you need to | |
# make a little change after you’ve already committed your changes. | |
git commit --amend --no-edit |
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 +x | |
# ssh tunnel proxy | |
ssh -i ~/.ssh/int.pem -o 'ProxyCommand=ssh -i ~/.ssh/ci.pem [email protected] -W %h:%p 2>/dev/null' [email protected] | |
ssh -o ProxyCommand='ssh -q -W %h:%p -i ~/.ssh/jumpbox-dev.pem ec2-user@jumpbox-host' -i ~/.ssh/emr-proteus-dev.pem hadoop@destination_host |
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 +x | |
/usr/local/bin/redis-cli flushall | |
/usr/local/bin/redis-cli bgsave | |
/usr/local/bin/redis-cli KEYS \* | |
/usr/local/bin/redis-cli SHUTDOWN SAVE | |
/usr/local/bin/redis-cli KEYS \* > /tmp/redis-queue.log | |
/usr/local/bin/redis-cli flushall | |
./redis-cli bgsave | |
/usr/local/bin/redis-cli KEYS \* |
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
perl cfsign.pl --action encode --url <URL> --expires 1475882487 --private-key private-key --key-pair-id AWS_ACCESS_KEY | |
aws --profile xyz s3 cp my.json s3://xyz/releases/my.json --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type application/json --acl public-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
-Dhudson.remoting.Launcher.pingTimeoutSec=240 | |
-Dhudson.remoting.Launcher.pingIntervalSec=0 (slave) | |
-Dhudson.slaves.ChannelPinger.pingIntervalSeconds=0 (master) |
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
'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 = 'user'; | |
const authPass = 'pass'; |
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
format <user,group,other> | |
7 read, write and execute 111 | |
6 read and write 110 | |
5 read and execute 101 | |
4 read only 100 | |
3 write and execute 011 | |
2 write only 010 | |
1 execute only 001 | |
0 none 000 |
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
import java.util.*; | |
import java.util.regex.*; | |
class NumRegex | |
{ | |
public static void main(String args[]) | |
{ | |
// Create a regular expression that matches | |
// any number You know all this! This is why you came here ;) | |
// What matches and what doesn't? | |
// 1 matches |
OlderNewer