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 | |
VERSION=3.3.0.1492-linux | |
echo "Downloading sonar-scanner....." | |
rm -rfv /tmp/sonar-scanner-cli-$VERSION.zip | |
wget -P /tmp/ -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$VERSION.zip | |
echo "Download completed." | |
echo "Unziping downloaded file..." | |
unzip -q /tmp/sonar-scanner-cli-$VERSION.zip -d /tmp/ |
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 | |
VERSION=3.3.0.1492-linux | |
echo "Downloading sonar-scanner....." | |
rm -rfv /tmp/sonar-scanner-cli-$VERSION.zip | |
wget -P /tmp/ -q https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$VERSION.zip | |
echo "Download completed." | |
echo "Unziping downloaded file..." | |
unzip /tmp/sonar-scanner-cli-$VERSION.zip -d /tmp/ |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<title></title> |
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
#!/bin/bash | |
############################################################################### | |
# Check style for list of code | |
# For source code | |
# - PHP | |
# - JS (js, es6, jsx) | |
# - CSS (css, scss, less) | |
# This can be used in build server or pre-commit hook in git, depends on the | |
# SOURCE_FILE variable. | |
############################################################################### |
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 sys | |
sys.path.append('gen-py') | |
sys.path.append('vendored') | |
from thrift.protocol import TBinaryProtocol, TJSONProtocol | |
from thrift.server import TServer | |
from thrift.transport import TTransport | |
from lambda_thrift_service import MultiplicationService | |
class MultiplicationServiceHandler(object): | |
def multiply(self, i, j): |
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 net.petrabarus.testandroid.dynamicdatabinding; | |
import android.content.Context; | |
import android.databinding.BindingAdapter; | |
import android.databinding.InverseBindingAdapter; | |
import android.databinding.InverseBindingListener; | |
import android.databinding.InverseBindingMethod; | |
import android.databinding.InverseBindingMethods; | |
import android.databinding.Observable; | |
import android.util.AttributeSet; |
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 | |
seq 10 | xargs -I X bash -c "echo X \$RANDOM" |
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 | |
seq 12 | pr -7ats, | xargs -I X echo "SELECT * FROM Table WHERE id IN (X)" | |
#output | |
#SELECT * FROM Table WHERE id IN (1,2,3,4,5,6,7) | |
#SELECT * FROM Table WHERE id IN (8,9,10,11,12) | |
seq 12 | pr -7ats | xargs -I X mysql database -e "DELETE FROM Table WHERE id IN (X)" |
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 | |
aws ec2 describe-spot-instance-requests | \ | |
jq -r '.SpotInstanceRequests | .[] | select(.LaunchSpecification.InstanceType == "c4.8xlarge" and .State == "active") | .InstanceId' | \ | |
xargs -I X sh -c "aws ec2 describe-instances --instance-id X | jq -r .Reservations[0].Instances[0].PublicDnsName" | \ | |
xargs -I X ssh -i ~/mykey.pem ubuntu@X "echo \"Hello WOrld\"" |
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
/** | |
* This function creates object which draws | |
* chart. | |
* Usage: | |
* var chart = new myChart(); | |
* chart.init('canvas'); | |
* | |
* Author: numlock | |
* email: [email protected] | |
* Created: 26.11.14. |