Skip to content

Instantly share code, notes, and snippets.

View jabelk's full-sized avatar

Jason Belk jabelk

View GitHub Profile
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@itdependsnetworks
itdependsnetworks / output.log
Created August 12, 2019 20:35
Various ways to restructure data in ansible
root@c4cc2b4306fd:/tmp/data-manipulation# ansible-playbook -i localhost, data-manipulation.yml
PLAY [SHOW THE VARIOUS WAYS TO RESTRUCTURE DATA] ***********************************************************************************************************************************************************
TASK [100 - SET FACT TO NORMALIZE DATA] ********************************************************************************************************************************************************************
ok: [localhost] => (item={u'destination_address': u'aabb.cc00.6000', u'vlan': u'153', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/36'})
ok: [localhost] => (item={u'destination_address': u'ca03.3efb.0000', u'vlan': u'100', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/36'})
ok: [localhost] => (item={u'destination_address': u'f44d.3063.34f3', u'vlan': u'22', u'type': u'DYNAMIC', u'destination_port': u'Fa1/0/35'})
ok: [localhost] => (item={u'destination_address': u'2c6b.f553.9d80', u'vlan': u'254', u'type
@fredrik-jansson-se
fredrik-jansson-se / ssh_device.py
Created September 19, 2017 00:45
SSH to a device in NSO's device list
#!/usr/bin/env python
import socket
import sys
import tty
import termios
import paramiko
from paramiko.py3compat import u
import ncs
from _ncs import decrypt
@plajjan
plajjan / .gitlab-ci.yml
Last active May 25, 2022 11:40
Git automation stuff
image: gitlab.dev.terastrm.net:4567/terastream/cisco-nso/ci-cisco-nso:4.2.3
stages:
- build
- mr-robot
variables:
NCS_VERSION: "4.2.3"
DOCKER_REGISTRY: "gitlab.dev.terastrm.net:4567/terastream/cisco-nso"
TARGET_REGISTRY: "repo.dev.terastrm.net:5000/"
@tmuth
tmuth / docker_exec.sh
Last active August 23, 2020 19:05
"Docker exec -it $1 bash" bash function for attaching to a running container
function docker_exec {
name="${1?needs one argument}"
containerId=$(docker ps | awk -v app="$name" '$2 ~ app{print $1}')
if [[ -n "$containerId" ]]; then
docker exec -it $containerId bash
else
echo "No docker container with name: $name is running"
fi
}
<interface xmlns="http://cisco.com/ns/yang/ned/ios" xmlns:y="http://tail-f.com/ns/rest" xmlns:ios="http://cisco.com/ns/yang/ned/ios">
<GigabitEthernet>
<name>1</name>
<switch>
</switch>
<switchport>
<access>
</access>
<trunk>
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@signed8bit
signed8bit / setting-up-a-pipeline.md
Last active March 16, 2017 19:25
DEVNET-1027 Setting up a Pipeline

Setting up a Pipeline

Commit Job

  • New Item -> Freestyle Project

    • Name: python-commit-job
  • General

@subfuzion
subfuzion / curl.md
Last active May 6, 2024 09:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@jaceklaskowski
jaceklaskowski / deployment-tool-ansible-puppet-chef-salt.md
Last active January 3, 2024 22:12
Choosing a deployment tool - ansible vs puppet vs chef vs salt

Requirements

  • no upfront installation/agents on remote/slave machines - ssh should be enough
  • application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
  • configuration templating
  • environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
  • deployment process run from Jenkins

Solution