Let's look at some basic kubectl output options.
Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).
We can start with:
kubectl get no
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
/etc/ssh/sshd_config
file by running the command sudo vi /etc/ssh/sshd_config
and do the following
Port
to 2222 (or any other port above 1000)PasswordAuthentication
to yes. This can be changed back to no if ssh keys are setup.sudo service ssh --full-restart
import os | |
import pickle | |
import warnings | |
import numpy as np | |
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from tensorflow.keras.callbacks import EarlyStopping | |
from tensorflow.keras.layers import Dense | |
from tensorflow.keras.layers import Dropout |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
#!/bin/bash | |
# Convert a Github Flavored Markdown Syntax file to HTML | |
# | |
# The MIT License (MIT) | |
# Copyright © 2012 Evertton de Lima <e.everttonlima@gmail.com> | |
# http://evertton.mit-license.org/ | |
# Stylesheet feature by Dan Untenzu <mail@pixelbrackets.de> | |
# | |
# Requirements: cURL (sudo apt-get install curl) |
#! /usr/bin/env python2 | |
''' | |
Register a mDNS/DNS-SD alias name for your computer using the Avahi daemon | |
This script will register an alternate CNAME alias besides your hostname, | |
which could be useful for ex. when serving several http virtual hosts to | |
your ffriends on the local network and you don't want to make them configure | |
their /etc/hosts. | |
Why a CNAME? You could also publish your current address with avahi-publish-address |
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
#!/bin/bash | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2018 Mathias Leppich <mleppich@muhqu.de> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |