- Change file /etc/sysconfig/network
- Change file /etc/hostname
- Chnage file /etc/hosts
sudo vim /etc/sysconfig/network| { | |
| "Volumes": [ | |
| { | |
| "AvailabilityZone": "us-west-2a", | |
| "Attachments": [ | |
| { | |
| "AttachTime": "2013-09-17T00:55:03.000Z", | |
| "InstanceId": "i-a071c394", | |
| "VolumeId": "vol-e11a5288", | |
| "State": "attached", |
| { | |
| "DBInstances": [ | |
| { | |
| "PubliclyAccessible": false, | |
| "MasterUsername": "mymasteruser", | |
| "MonitoringInterval": 0, | |
| "LicenseModel": "general-public-license", | |
| "VpcSecurityGroups": [ | |
| { | |
| "Status": "active", |
| #!/usr/bin/env python | |
| """ | |
| mocking requests calls | |
| """ | |
| import mock | |
| import unittest | |
| import requests | |
| from requests.exceptions import HTTPError |
| // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
| # PROBLEM LINK : https://www.hackerrank.com/challenges/temperature-predictions | |
| import numpy as np | |
| from sklearn import ensemble | |
| def isfloat(value): | |
| try: | |
| float(value) | |
| return True |
| Description: Create WebACL example | |
| Parameters: | |
| WebACLDefaultAction: | |
| Type: String | |
| AllowedValues: | |
| - Allow | |
| - Block | |
| WebACLRuleAction: | |
| Type: String |
| /* | |
| * This is a simple HTTP data generator for testing. | |
| * | |
| */ | |
| var http = require('http'); | |
| var counter = 0; | |
| http.createServer(function (req, res) { | |
| var start = new Date(); |
| #!/bin/bash | |
| set -e | |
| set -o pipefail | |
| # Add user to k8s using service account, no RBAC (must create RBAC after this script) | |
| if [[ -z "$1" ]] || [[ -z "$2" ]]; then | |
| echo "usage: $0 <service_account_name> <namespace>" | |
| exit 1 | |
| fi |