Skip to content

Instantly share code, notes, and snippets.

View vincentvdk's full-sized avatar

Vincent Van der Kussen vincentvdk

View GitHub Profile

Context switch tools

Kubie

Fix alternative zsh configuration ($ZDOTDIR).

Create a ~/.zshenv file with content ZDOTDIR=/opt/config/zsh

@vincentvdk
vincentvdk / README.md
Created June 14, 2022 18:16 — forked from acamino/README.md
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
package main
import (
"encoding/json"
"fmt"
)
func main() {
b := []byte(`{"key":"value"}`)
@vincentvdk
vincentvdk / keybase.md
Created February 23, 2015 20:50
keybase

Keybase proof

I hereby claim:

  • I am vincentvdk on github.
  • I am vincentvdk (https://keybase.io/vincentvdk) on keybase.
  • I have a public key whose fingerprint is 5CF6 F20A 0D0C 6F75 CF5B D4CA 350E 608F 48A2 73A3

To claim this, I am signing this object:

select concat(d.name, '.', if (b.name is null, '', b.name + '.'), a.name) from `dns` d, `domains` a
left join `domains` b on b.id = a.parent_id
where d.domain_id = a.id
limit 0, 500;
host_var
========
---
storage_vg: vg_vms
vms:
node-00008:
disksize: 10000
lvsize: 10G
memory: 1024
cpu: 1
@vincentvdk
vincentvdk / gist:6696654
Created September 25, 2013 08:24
ansible register variable
running from Ansible works :
→ ansible 192.168.13.42 -m shell -a "update-alternatives --display java | grep currently | awk '{print \$5}'" -u root -k [master]
SSH password:
192.168.13.42 | success | rc=0 >>
/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
running from playbook
@vincentvdk
vincentvdk / ansible.ldif_schema
Created June 6, 2013 14:51
ansible schema converted to ldif for easy import
dn: cn=ansible,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: ansible
olcAttributeTypes: {0}( 1.3.6.1.4.1.7637.70.1.2.1 NAME 'ansibleVar' DESC 'A va
riable=value setting for an Ansible host' EQUALITY caseIgnoreMatch SUBSTR cas
eIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} )
olcObjectClasses: {0}( 1.3.6.1.4.1.7637.70.1.1.1 NAME 'ansibleHost' DESC 'Ansi
ble host entry' SUP top AUXILIARY MAY ansibleVar )
for system in systems:
if system.get('name') == host:
#print system['name']
sys_id = system.get('id')
#id2 = int(idken)
print sys_id
#get the system name and print it
print "%s" % (system.get('name'))
#basechan = client.system.listBaseChannels(session, int(sys_id))