I hereby claim:
- I am waleedsamy on github.
- I am waleedsamy (https://keybase.io/waleedsamy) on keybase.
- I have a public key ASAWXFhRpUySgDNxVAXdZKCz9RbYLHNfBhCe11kNYh1XFwo
To claim this, I am signing this object:
#record revision with clear information | |
kubectl create -f xDeployment.yaml --record | |
# interactive command to get the status for a deployment, you can check it's result with $? | |
kubectl rollout status deploy/x | |
# show revisions | |
kubectl rollout history deploy/x | |
# details about revision 1 | |
kubectl rollout history deploy/x --revision 1 | |
#rollback to to previous version | |
kubectl rollout undo deploy/x |
grep -E -o ".{0,1}string.{0,6}" afile |
# https://stackoverflow.com/a/42544963/5318264 | |
brew install coreutils findutils gnu-tar gnu-sed gawk gnutls gnu-indent gnu-getopt | |
git rev-list --objects --all \ | |
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \ | |
| awk '/^blob/ {print substr($0,6)}' \ | |
| sort --numeric-sort --key=2 \ | |
| gcut --complement --characters=8-40 \ | |
| gnumfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest |
<p><a href="https://asciinema.org/a/14"><img src="https://asciinema.org/a/14.png" alt="asciicast" title=""></a></p> | |
<h5 id="download-docker-binary">Download docker binary</h5> | |
<p><code>bash <br> | |
ssh ubuntu@ec2-54-154-81-176.eu-west-1.compute.amazonaws.com <br> | |
sudo su - && <br> | |
wget https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 && <br> | |
chmod +x docker-1.9.1 <br> | |
mv ./docker-1.9.1 /usr/bin/docker <br> |
I hereby claim:
To claim this, I am signing this object:
3F9E 6349 5EA4 53A8 FF26 FDCD 680B 460F 9694 E494 |
class Main{ | |
public static void main(String[] args){ | |
print1ToXWithRecursion(100); | |
} | |
public static void print1ToXWithRecursion(int num){ | |
if(num > 1) | |
print1ToXWithRecursion(num -1 ); | |
System.out.println(num); | |
} |
abstract class AbsIterator{ | |
type T | |
def hasNext:Boolean | |
def next: T | |
} | |
trait RichItr extends AbsIterator{ | |
def foreach(f: T => Unit) = while (hasNext) f(next) | |
} |
const flatten = arr => arr.reduce( | |
(acc, val) => acc.concat(Array.isArray(val) ? flatten(val) : val), [] | |
); | |
module.exports = { | |
flatten: flatten | |
} | |
// let list = [1, [2], 3, [4, 5, [6, 7, [8, 9, 10]]]] | |
// console.log(flatten(list)); |
#!/bin/bash | |
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging | |
#shopt -o -s xtrace | |
usage() | |
{ | |
cat <<EOF | |
usage: $0 options | |
This script will fetch an artifact from a Nexus server using maven, please make sure maven 3 is installed. |