See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
http://rpc.pingomatic.com/ | |
http://services.newsgator.com/ngws/xmlrpcping.aspx | |
http://rpc.weblogs.com/RPC2 | |
http://rpc.twingly.com | |
http://rpc.pingomatic.com | |
http://ping.syndic8.com/xmlrpc.php | |
http://ping.feedburner.com | |
http://blogsearch.google.us/ping/RPC2 | |
http://blogsearch.google.tw/ping/RPC2 | |
http://blogsearch.google.sk/ping/RPC2 |
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
function solution(A, K) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
if (A.length === K || K === 0) { | |
return A | |
} else if (A.length === 0) { | |
return [] |
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
function solution(N) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
let binary = (N >>> 0).toString(2); | |
let totalGaps = [] | |
let tmp = 0 | |
for (let i = 0; i < binary.length; i++) { |
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
function solution(A) { | |
// write your code in JavaScript (Node.js 8.9.4) | |
let tmp = [] | |
for (let i = 0; i < A.length; i++) { | |
if (0 <= A[i]) { | |
tmp[A[i]] = true |
#!/usr/bin/env bash | |
export $(cat .env | xargs) | |
KINESIS_STREAM_SHARDS=${KINESIS_STREAM_SHARDS:-1} | |
export USE_SSL=true | |
awslocal kinesis create-stream --shard-count ${KINESIS_STREAM_SHARDS} \ | |
--stream-name ${KINESIS_STREAM_NAME} |
Script to list all algorithms. | |
``` | |
var crypto = require('crypto'); | |
var ciphers = crypto.getCiphers(); | |
for(var i = 0; i < ciphers.length; i++) { | |
console.log(ciphers[i]); | |
} | |
``` | |
Result. | |
``` |
#!env bash | |
doInstallServer(){ | |
if [[ -e /etc/redhat-release ]]; then | |
RELEASE_RPM=$(rpm -qf /etc/centos-release) | |
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM}) | |
if [ ${RELEASE} != "7" ]; then | |
echo "Bukan CentOS Release 7." | |
exit 1 | |
fi | |
else |
#!env bash | |
installCNMP(){ | |
if [[ -e /etc/redhat-release ]]; then | |
RELEASE_RPM=$(rpm -qf /etc/centos-release) | |
RELEASE=$(rpm -q --qf '%{VERSION}' ${RELEASE_RPM}) | |
if [ ${RELEASE} != "7" ]; then | |
echo "Not CentOS release 7." | |
exit 1 | |
fi | |
else |
Lesson 1 - Iterations | |
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/ | |
Lesson 2 - Arrays | |
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/ | |
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/ | |
Lesson 3 - Time Complexity | |
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/ | |
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/ |