Skip to content

Instantly share code, notes, and snippets.

@consentfactory
consentfactory / netmiko_threading_queuing.py
Last active October 18, 2024 02:29
Script to perform multithreading with Netmiko.
#!/usr/bin/python3
# Jimmy Taylor
# https://www.consentfactory.com/python-threading-queuing-netmiko/
# This method will spin up threads and process IP addresses in a queue
# Importing Netmiko modules
from netmiko import Netmiko
from netmiko.ssh_exception import NetMikoAuthenticationException, NetMikoTimeoutException
@VacantThinker
VacantThinker / Export project from StackBlitz to local.md
Created May 4, 2023 05:20
Export project from StackBlitz to local

7V9ah

from:
https://stackoverflow.com/questions/52560532/export-angular-project-from-stackblitz-to-local
@0xjac
0xjac / private_fork.md
Last active October 18, 2024 02:26
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@bomsn
bomsn / geolocation.js
Last active October 18, 2024 02:23
Get User Postal Code ( Zip Code ) with Browser Geolocation & Google API
// jQuery must be loaded before calling this function ( for AJAX )
let getUserPostcode = () => {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
(position) => {
let lat = position.coords.latitude,
long = position.coords.longitude,
url = "https://maps.googleapis.com/maps/api/geocode/json?latlng=" + lat + "," + long + "&key=YOUR_GOOGLE_API_KEY";
$.ajax({
type: "GET",
@ChuckMichael
ChuckMichael / vcredistr.md
Last active October 18, 2024 02:20
Visual C++ Redistributable Packages
@Socialdarwinist
Socialdarwinist / XML lines to be added at an appropriate place in base.xml
Last active October 18, 2024 02:20
International Phonetic Alphabet keyboard layout for XKB filled with other characters that are useful for transcribing, transliterating
<layout>
<configItem>
<name>trans</name>
<description>International Phonetic Alphabet</description>
</configItem>
<variantList/>
</layout>
@abravalheri
abravalheri / commit.md
Last active October 18, 2024 02:19 — forked from stephenparish/commit.md
RFC: Git Commit Message Guidelines

Commit Message Guidelines

In the last few years, the number of programmers concerned about writing structured commit messages have dramatically grown. As exposed by Tim Pope in article readable commit messages are easy to follow when looking through the project history. Moreover the AngularJS contributing guides introduced conventions that can be used by automation tools to automatically generate useful documentation, or by developers during debugging process.

This document borrows some concepts, conventions and even text mainly from these two sources, extending them in order to provide a sensible guideline for writing commit messages.

@wojtekmaj
wojtekmaj / find-scroll-container.js
Last active October 18, 2024 02:18
Find the nearest scrollable container.
const findScrollContainer = (element) => {
if (!element) {
return undefined;
}
let parent = element.parentElement;
while (parent) {
const { overflow } = window.getComputedStyle(parent);
if (overflow.split(' ').every(o => o === 'auto' || o === 'scroll')) {
return parent;
@nblumoe
nblumoe / vim_fireplace_paredit_cheat_sheet.md
Created April 24, 2013 06:41
Simple cheat sheet for vim fireplace and paredit

fireplace

  • cpr => (require ... :reload)
  • cpR => (require ... :reload-all)

Evaluation

  • :Eval (clojure code) => runs (clojure code) in repl
  • cpp => evaluate inn-most expessions under cursor
  • cp<movement> => evaluate text described by <movement>
  • cqp => opens quasi-repl
  • cqc => quasi-repl command line window
@privatenumber
privatenumber / light-dark-image.svg
Last active October 18, 2024 02:09
Light/dark mode SVG image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.