This file contains 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
root@slave01 (localhost) [(none)]> SHOW MASTER STATUS\G | |
*************************** 1. row *************************** | |
File: mysql-bin.000002 | |
Position: 12823679 | |
Binlog_Do_DB: | |
Binlog_Ignore_DB: | |
Executed_Gtid_Set: 075d81d6-8d7f-11e3-9d88-b4b52f517ce4:1-1075752934, | |
b0ffcb4d-1a8e-11e5-bab3-e4115bd95ad8:1, | |
cd56d1ad-1e82-11e5-947b-b4b52f51dbf8:1-1030513130, | |
e907792a-8417-11e3-a037-b4b52f51dbf8:1-25858698180 |
This file contains 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
root@slave01 (localhost) [(none)]> SHOW MASTER STATUS\G | |
*************************** 1. row *************************** | |
File: mysql-bin.000002 | |
Position: 12823679 | |
Binlog_Do_DB: | |
Binlog_Ignore_DB: | |
Executed_Gtid_Set: 075d81d6-8d7f-11e3-9d88-b4b52f517ce4:1-1075752934, | |
cd56d1ad-1e82-11e5-947b-b4b52f51dbf8:1-1030537308:1030537310-1030538689, | |
e907792a-8417-11e3-a037-b4b52f51dbf8:1-25858698180 | |
1 row in set (0.00 sec) |
This file contains 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
set number " Line numbering | |
autocmd BufWritePre *.pp :%s/\s\+$//e " Remove whitespaes from the end of puppet file lines | |
autocmd BufNewFile,BufRead *.pp set filetype=ruby " Deal *.pp files with Ruby syntax | |
syntax enable " Have syntax highlighted | |
set background=dark " Use light backgroud | |
colorscheme solarized " Solarized color scheme | |
set nocompatible " Behave as VIM not VI | |
filetype indent plugin on " Indent files | |
set hidden | |
set showcmd |
This file contains 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
- hosts: "{{ host_to_rebuild }}" | |
gather_facts: False | |
user: root | |
serial: 1 | |
tasks: | |
- name: Set PXE boot | |
shell: ipmitool chassis bootdev pxe |
This file contains 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
all: build | |
deps: | |
GOPATH=$(shell pwd) go get github.com/go-sql-driver/mysql | |
GOPATH=$(shell pwd) go get github.com/koding/logging | |
GOPATH=$(shell pwd) go get gopkg.in/ini.v1 | |
build: deps | |
GOPATH=$(shell pwd) go build -v -x binlogstreamer.go | |
linux: deps | |
GOPATH=$(shell pwd) GOOS=linux go build -v -x binlogstreamer.go | |
darwin: deps |
This file contains 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
openssl genrsa -out bodhisattva.key 2048 | |
openssl req -new -x509 -key bodhisattva.key -out bodhisattva.cert -days 3650 -subj /CN=bodhisattva |
This file contains 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
tcpdump -i ens2f1 -s 0 -l -w - dst port 3306 | strings |
This file contains 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
#!/usr/bin/env python | |
""" | |
This script replaces plain text passwords with sha512 encrypted passwords in | |
ansbile playbooks - when a lot of users created at once. | |
There are few known limitations: | |
- When a line contains the string begins with 'password:' the script will replace the rest | |
of the line with the hash | |
- A plain text password shouldn't contain ' | |
- If a password already hashed, the hash will be treated as plain text |
This file contains 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
#!/usr/bin/env python | |
def scalar(a, b): | |
acc = 0 | |
for num in range(len(a)): | |
acc += a[num] * b[num] | |
return acc | |
def vectorial(a, b): | |
c = [None] * 3 |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int scalar(int *v1, int *v2, int len){ // parameterek: a ket osszeszorzando vektorra mutato pointerek, | |
// es a ket vektor dimenzioszama | |
int acc = 0; // az akkumulatorba 0-t teszunk | |
for(int i=0; i < len; i++) { // ezzel a ciklussal vegiglepkedunk a vektorokon | |
acc += v1[i] * v2[i]; // az akkumulator ertekehez hozzaadjuk a ket tomb i-edik elemeinek a szorzatat | |
} |
OlderNewer