Skip to content

Instantly share code, notes, and snippets.

@RMcGhee
RMcGhee / .show_ssh.sh
Created April 25, 2024 19:06
Show your ssh configs in a table format
#!/bin/bash
# Path to the SSH config file
config_file="$HOME/.ssh/config"
# Check if the SSH config file exists
if [[ ! -f "$config_file" ]]; then
echo "SSH config file not found at $config_file"
exit 1
fi
using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Text;
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@mhfaisalbd
mhfaisalbd / addotnet.md
Last active April 30, 2024 08:48
Application Development (.NET) Learning path

System Application Development (.NET)

Syllabus and Course Manual for Class Lectures

PART I (.NET Programming Using C#)

Total Lecture Count: 10 Total Duration: 15:00 Hours (approx.)

Class 0: Scratch & Fundamental Concepts (Duration: 02:00 Hours Approx.)

  • Introduction
  • What is System Development
@BlurryLight
BlurryLight / qrenderdoc.pyi
Created June 17, 2023 09:08
RenderDoc Python API Stubs
from typing import Any, ClassVar
from typing import overload
import collections
import enum
import importlib._bootstrap
class APIInspector(SwigPyObject):
this: Any
thisown: Any
@guillaumemeyer
guillaumemeyer / export-team-membership-roster.js
Last active April 30, 2024 08:47
Exports the owners and members of a Microsoft Teams team as a CSV file
// ****************************************************************************************************************************
// Abstract:
// This script is just a quick hack to export the owners and members of a team as a CSV file without administrator permissions.
//
// Usage:
// 1. Open your team
// 2. Select "Manage team" from its menu
// 3. Select the "Members" tab
// 4. Expand the "Owners" and "Members and guests" sections
// 5. Make sure to scroll down to the end of the owners and members lists to include all of them in your export (As the members are loaded on demand)
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 30, 2024 08:46
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

@Sharpie
Sharpie / README.md
Last active April 30, 2024 08:46
Metric Scraping Scripts

This gist contains various scripts for scraping metrics. Mostly useful for processing the contents of Puppet Enterprise support bundles:

  • sar2influx.rb: A Ruby script that uses sadf to turn SAR archives into InfluxDB line format. For best results, run from a Linux VM using a recent operating system. Such as Ubuntu 22.04.
  • pdb2influx.sh: A bash script that uses awk and mlr to extract command processing times from puppetdb.log files.
  • top-api-calls.sh: Extracts the 10 most popular API calls from *-access.log along with their median and max duration grouped into 30 minute periods (Puppet $runinterval). Uses awk and mlr.
@smdabdoub
smdabdoub / merge_git_repo_as_subdir
Created June 9, 2015 14:02
Merge one git repository into another repository as a sub-directory
# based on the following:
# http://saintgimp.org/2013/01/22/merging-two-git-repositories-into-one-repository-without-losing-file-history/
# http://blog.caplin.com/2013/09/18/merging-two-git-repositories/
git clone repo_main
git clone repo_sub
cd repo_main
git remote add repo_sub ../repo_sub
git fetch repo_sub