Skip to content

Instantly share code, notes, and snippets.

View netmonk's full-sized avatar
🏠
Working from home

Netmonk netmonk

🏠
Working from home
View GitHub Profile
#!/usr/bin/awk
function abs(v) {v += 0; return v < 0 ? -v : v}
function rmcol(col) {
for (i=col; i<NF; i++) {
$i = $(i+1)
}
NF--
}
#!/usr/bin/awk
BEGIN {
n=0 ;
lista[n]="";
listb[n]="";
resulta=0;
resultb=0;
}
use std::process;
use std::io::{self,Write};
use std::fmt::Write as FmtWrite;
fn main() {
let mut num1: u64 =0 ;
let mut num2: u64 =1 ;
let mut s = String::new();
let stdout = io::stdout();
let mut handle = stdout.lock();
result = [
{
"path": "/app/wg/sae/saep01/001_005/sql/list.sae_delta_001_005.scripts",
"pw_name": "qlwgapad",
},
{
"path": "/app/wg/sae/saep01/001_005/sql/list.tkr_delta_001_005.scripts",
"pw_name": "qlwgapad",
@netmonk
netmonk / docker-compose.yml
Created January 20, 2020 08:24
docker compose
version: "3.3"
services:
traefik:
image: "traefik:latest"
container_name: "traefik"
restart: always
command:
- "--api.insecure=true"
TASK [mysql_db : inserting data into Latin1 database] **************************
changed: [testhost] => {"changed": true, "cmd": ["mysql", "db_latin1", "-e insert into testlatin1 value(47,'Amédée Bôlüt');"], "delta": "0:00:00.012309", "end": "2019-11-23 23:09:42.919733", "rc": 0, "start": "2019-11-23 23:09:42.907424", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
TASK [mysql_db : selecting table] **********************************************
changed: [testhost] => {"changed": true, "cmd": ["mysql", "db_latin1", "-e select * from testlatin1;"], "delta": "0:00:01.005965", "end": "2019-11-23 23:09:44.122490", "rc": 0, "start": "2019-11-23 23:09:43.116525", "stderr": "", "stderr_lines": [], "stdout": "id\tname\n47\tAmédée Bôlüt", "stdout_lines": ["id\tname", "47\tAmédée Bôlüt"]}
TASK [mysql_db : debug] ********************************************************
ok: [testhost] => {
"output": {
"changed": true,
- hosts: localhost
gather_facts: false
run_once: True
any_errors_fatal: true
tags: always
vars:
kinit_action: init
username: "{{ output.stdout }}"
tasks:
- name: Kinit| get the username running the playbook
---
- hosts: localhost
gather_facts: false
connection: local
run_once: True
vars:
# ansible_user: p000724
kinit_action: init
vars_prompt:
- name: "password_kinit"
- name: bddeploy | Get Table list from database
delegate_to: 127.0.0.1
shell: /bin/mysql -u {{ dbadmin }} --password={{ dbadminpassword }} -h {{ item.dbhost }} {{ item.dbname }} -s -N -e "select table_name from information_schema.tables where table_schema = 'SAEP01' ;"
register: table_list1
when: not install_by_mysql_module
with_items:
- { dbname: "{{ dbname_tango }}", dbhost: "{{ dbhost_tango }}" }
- { dbname: "{{ dbname_tkr }}", dbhost: "{{ dbhost_tkr }}" }
- { dbname: "{{ dbname_saf }}", dbhost: "{{ dbhost_saf }}" }
const int redPin = 5;
const int whitePin = 4;
const int bluePin = 16;
const int greenPin = 17;
const int potPin = 34;
int potValue = 0;
int timer=0;
void setup() {
// put your setup code here, to run once: