Skip to content

Instantly share code, notes, and snippets.

View vincentvdk's full-sized avatar

Vincent Van der Kussen vincentvdk

View GitHub Profile
@vincentvdk
vincentvdk / Update-branch.md
Created October 16, 2024 09:09 — forked from santisbon/Update-branch.md
Deploying from #Git branches adds flexibility. Bring your feature branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master.

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))