kubectl --context=dev-gke --namespace=loon cp <pod>:<file> <local_file_name>
Example:
kubectl --context=dev-gke --namespace=videometadataservice cp http-6c56fbc86b-jg7tt:file.txt file.txt
WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277
Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.
regex = ur'(\s|\=|\(|\[|\{)[u]{0}(\'|\")(?!\"\")(?!\'\')' |
#!/bin/bash | |
# | |
# Install Postgres 9.2 on a clean Ubuntu 12.04 | |
""" | |
LC_ALL issue | |
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file. | |
sudo apt-get install language-pack-en-base | |
sudo dpkg-reconfigure locales | |
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file. |
/* | |
SublimeLinter default settings | |
*/ | |
{ | |
/* | |
Sets the mode in which SublimeLinter runs: | |
true - Linting occurs in the background as you type (the default). | |
false - Linting only occurs when you initiate it. | |
"load-save" - Linting occurs only when a file is loaded and saved. |
assert = require 'assert' | |
request = require 'request' | |
app = require '../../app' | |
describe "authentication", -> | |
describe "GET /login", -> | |
body = null | |
before (done) -> | |
options = |
<HTML> | |
<HEAD> | |
<TITLE>Trouble</TITLE> | |
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> | |
</HEAD> | |
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link="#000000" alink="#000000" vlink="#666666"> | |
<% If Request.QueryString("Action") = "" Then %> | |
<% | |
If Session.Contents("Browse") <> "Yes" Then | |
Response.Redirect("index.asp") |
class DisableMigrations(object): | |
def __contains__(self, item): | |
return True | |
def __getitem__(self, item): | |
return 'notmigrations' | |
# ENABLE THIS TO SPEED UP TESTS | |
MIGRATION_MODULES = DisableMigrations() |
package hello | |
import "fmt" | |
// SayHello says hello! | |
func SayHello() { | |
fmt.Println("HELLO!") | |
} |
## common/models.py | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.contenttypes import generic | |
class CommonFile(models.Model): | |
""" Model for common files. """ | |
content_type = models.ForeignKey(ContentType) | |
object_id = models.PositiveIntegerField() | |
content_object = generic.GenericForeignKey('content_type', 'object_id') | |
order = PositionField(unique_for_field='object_id') |