apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
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 'zone.js/dist/zone-node'; | |
| import { APP_BASE_HREF } from '@angular/common'; | |
| import { ngExpressEngine } from '@nguniversal/express-engine'; | |
| import * as express from 'express'; | |
| import { existsSync } from 'fs'; | |
| import { join } from 'path'; | |
| import * as redis from 'redis'; | |
| import { AppServerModule } from './src/main.server'; |
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
| ################################################### | |
| ## | |
| ## Alertmanager YAML configuration for routing. | |
| ## | |
| ## Will route alerts with a code_owner label to the slack-code-owners receiver | |
| ## configured above, but will continue processing them to send to both a | |
| ## central Slack channel (slack-monitoring) and PagerDuty receivers | |
| ## (pd-warning and pd-critical) | |
| ## |
DST=/mnt
find /var/lib -type f -size +1G -exec ls -lh {} \; | tee $DST/bigfiles_var_lib_$(date "+%H%M").log
find /var/lib -type f -size +1G -exec ls -lh {} \; | awk '{ print $5 ": " $9 }' | sort -rh > $DST/bigfiles_var_lib_$(date "+%H%M").sorted.log
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
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 | |
| # This script, executed at the root of a git repository, deletes traces of every old file in this repository, index + blob on all branches | |
| # It can take 10-30 minutes to run and will print regular warning stating than some references are unchanged | |
| # time ./clear_git_repositor.bash >cleaning.log | |
| # We need several passes to clean files renamed multiple times (git log --find-renames prevents its deletion for each renaming) | |
| # MAXIMUM_PASSES should be more than the maximum number of renamings/movings for any file, if not then we might keep some traces of former files | |
| MAXIMUM_PASSES=10 # Maximum number of passes |
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 | |
| # | |
| # Uses hg convert to strip a repository from <start revision> | |
| # If no revision is specified, the whole repository is converted. | |
| # Optionally a "cache" repository can be used, to be sure that the | |
| # source repository is not written during the convert operation. | |
| # | |
| while getopts "r:s:d:c:h?" opt; do | |
| case $opt in |
First, you should ask for his/her Github username and check public repositories.
Note: Keep in mind that many of these questions are open-ended and could lead to interesting discussions that tell you more about the person's capabilities than a straight answer would.
- What Javascript Frameworks do you know? Which one do you like? Why?
- What is the atomic design?
Coined by Brad Frost, Atomic Design is a methodology that involves breaking a website layout down into its basic components, which are then reused throughout the site. You have Atoms => Molecules => Organisms => Templates => Pages.
- Can you name two programming paradigms important for JavaScript app developers?
The set lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefailis short for:
set -e
set -u