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
# if this is resulting in the same error for kubectl commands against your gke: | |
gcloud auth login | |
# you should try this: | |
gcloud auth application-default login | |
# behavior was changed in gcloud v128, see here: https://cloud.google.com/sdk/docs/release-notes#12800_20160928 | |
# kudos for details to this so answer: https://stackoverflow.com/questions/41507904/could-not-find-default-credentials |
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
docker exec -it <container_name||container_hash> /bin/bash |
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
docker run -p 8080:8080 jenkins/jenkins:lts |
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
sudo groupadd docker | |
sudo usermod -aG docker $(whoami) | |
sudo systemctl start docker | |
sudo chgrp docker /lib/systemd/system/docker.socket | |
sudo chmod g+w /lib/systemd/system/docker.socket |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
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
//bad | |
function(){ | |
var force = 0; | |
for(var i=0; i<500; i++){ | |
//using the force | |
force++; | |
} | |
var lightSaber = 0; |
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
console.log('works'); |
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
ko.bindingHandlers[customBindingName] = { | |
init: function (element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) { | |
var handler = valueAccessor(); | |
handler(viewModel, e); | |
} | |
}; |
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
function changeUndefinedInside(undefined){ | |
undefined=42; | |
var a=42; | |
console.log(undefined);//42 | |
console.log(a===undefined);//true | |
}; | |
changeUndefinedInside(undefined); | |
console.log(undefined);//undefined |
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
function say(a){ | |
var inner = function(b){ | |
return say(a+b); | |
}; | |
inner.toString = function(){ | |
return a; | |
}; | |
return inner; |
NewerOlder