Skip to content

Instantly share code, notes, and snippets.

View w-vi's full-sized avatar

Vilibald w-vi

View GitHub Profile

Debugging ssh

Connection

First thing is to get the debug output from ssh.

$ ssh -vvv <host>

There will be a lot of output so maybe start with just -v.

@w-vi
w-vi / keybase.md
Last active November 16, 2018 14:10
keybase.md

Keybase proof

I hereby claim:

  • I am w-vi on github.
  • I am wvi23 (https://keybase.io/wvi23) on keybase.
  • I have a public key ASDVDt2RMeLpbiv-pAFf6gkGLs-XliK-WGEuU_p1tlIn9Qo

To claim this, I am signing this object:

@w-vi
w-vi / depc.js
Created October 10, 2018 06:56
libnpm usage to inspect the dependency tree
'use strict';
const fs = require('fs');
const pkg = require('./package');
const _ = require('lodash');
const npm = require('libnpm');
const async = require('neo-async');
const kv = require('./kv');
function check (pkgjson) => {
@w-vi
w-vi / msoncomposition.apib
Created June 26, 2018 09:08
MSON Composition
FORMAT: 1A
# A
## A [GET /a]
+ Request (application/json)
+ Attributes(Filter)
@w-vi
w-vi / resume@.service
Created December 16, 2017 17:09
User action on suspend/hybernate/resume
# /etc/systemd/system/resume@.service
[Unit]
Description=User resume actions
After=suspend.target
[Service]
User=%I
Type=simple
ExecStartPre=/usr/local/bin/ssh-connect.sh
ExecStart=/usr/bin/mysql -e 'slave start'
@w-vi
w-vi / rm-vault.md
Created November 19, 2017 10:15
Remove aws glacier vault

How to delete Vault (AWS Glacier)

This Gist give some tips in order to remove AWS Glacier Vault with AWS CLI (ie. https://aws.amazon.com/en/cli/).

Step 1 / Retrive inventory

$ aws glacier initiate-job --job-parameters '{"Type": "inventory-retrieval"}' --vault-name YOUR_VAULT_NAME --account-id YOUR_ACCOUNT_ID --region YOUR_REGION
@w-vi
w-vi / global_gitignore
Created July 25, 2017 07:05
global gitignore
# -*- mode: gitignore; -*-
# Emacs specific global ignores
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
@w-vi
w-vi / test_fail.c
Last active February 28, 2017 08:33
C unit tests
#include "testing.h"
TEST_IMPL(fail) {
return TEST_FAIL;
}
@w-vi
w-vi / citimes.py
Created December 21, 2016 08:24
Pull Circle CI build data
#!/usr/bin/env python
import sys
import logging
import argparse
import textwrap
import json
import dateutil.parser
import dateutil
import urllib.request as urllib
@w-vi
w-vi / plot-and-smooth.py
Created November 21, 2016 19:26
Plotting and smoothing
import csv
from datetime import datetime
import matplotlib.pyplot as plt
from scipy.signal import savgol_filter
# Input is a csv file in the following form
# the value to be plotted, date (timestamp), .... whatever
def plot_times(infile):