I hereby claim:
- I am kam1kaze on github.
- I am kam1kaze (https://keybase.io/kam1kaze) on keybase.
- I have a public key ASAxoAnjqASjGYy273bkXAYlaBQ8YQ2nZ7ywAs5mvf8Mqwo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# Example: | |
# | |
# ❯ ./nodelocaldns.sh | kubectl apply -f - | |
# serviceaccount/node-local-dns created | |
# service/kube-dns-upstream created | |
# configmap/node-local-dns created | |
# daemonset.apps/node-local-dns created | |
# |
#!/usr/bin/env bash | |
set -eu | |
sedi () { | |
sed --version &>/dev/null && sed -i -- "$@" || sed -i "" "$@" | |
} | |
if ! command -v fzf &>/dev/null; then | |
echo 'Please install `fzf` https://github.com/junegunn/fzf#using-homebrew-or-linuxbrew' |
I hereby claim:
To claim this, I am signing this object:
VIM allows execute external commands and replace neccessary line/block with the command output.
:.
- current line:%
- full buffer:1,10
- line range:'<,'>
- visually selected blockFormat JSON with jq
:.!jq .
Chef Solo is very useful for single server configuration management.
Chef Solo config file '/etc/chef/solo.rb' is optional and it defaults to repo='/var/chef/'.
Just copy cookbooks directly to /var/chef/cookbooks. Run them using chef-solo command.
For e.g
cp -a /var/chef/cache/cookbooks /var/chef/cookbooks
# chef-shell -z | |
loading configuration: /etc/chef/client.rb | |
Session type: client | |
Loading....Using policy 'test' at revision '95108111a05c1247abfa80916650bf1b727528eb9cfb25ff54e6cdfd9000bf0b' | |
[2018-02-05T19:57:44+00:00] INFO: Run List is [["recipe[firewall::default]"]] | |
[2018-02-05T19:57:44+00:00] INFO: Run List expands to [firewall::[email protected] (897084d)] | |
resolving cookbooks for run list: ["firewall::[email protected] (897084d)"] | |
[2018-02-05T19:57:44+00:00] INFO: Loading cookbooks [[email protected], [email protected]] | |
Synchronizing Cookbooks: | |
. - firewall (2.6.3) |
// {{ Disable Job DSL script approval | |
import javaposse.jobdsl.plugin.GlobalJobDslSecurityConfiguration | |
import jenkins.model.GlobalConfiguration | |
GlobalConfiguration.all().get(GlobalJobDslSecurityConfiguration.class).useScriptSecurity=false | |
// comment next line if we need to disable it only for current session | |
GlobalConfiguration.all().get(GlobalJobDslSecurityConfiguration.class).save() | |
// }} |
import jenkins.model.* | |
import com.cloudbees.plugins.credentials.* | |
import com.cloudbees.plugins.credentials.common.* | |
import com.cloudbees.plugins.credentials.domains.* | |
import com.cloudbees.plugins.credentials.impl.* | |
import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
import hudson.plugins.sshslaves.*; | |
domain = Domain.global() | |
store = Jenkins.instance.getExtensionList('com.cloudbees.plugins.credentials.SystemCredentialsProvider')[0].getStore() |
#!/usr/bin/env bash | |
set -ex | |
if [[ "$OSTYPE" == "linux-gnu" ]]; then | |
# Linux | |
sudo apt-get update && sudo apt-get install ioquake3 | |
mkdir -p ~/.q3a/baseq3 && pushd "$_" | |
elif [[ "$OSTYPE" == "darwin"* ]]; then |
#!/usr/bin/env ruby | |
require 'yaml' | |
def parse_yaml(cl, align = '') | |
puts align + cl | |
reclass_dir = '/srv/salt/reclass' | |
yaml_file = if cl =~ /\.yml$/ | |
cl | |
elsif File.exist?(reclass_dir + '/classes/' + cl.tr('.', '/') + '/init.yml') |