Skip to content

Instantly share code, notes, and snippets.

@maartenba
maartenba / inspectcode.xslt
Last active May 8, 2024 13:15
R# InspectCode XSLT
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:key name="ISSUETYPES" match="/Report/Issues/Project/Issue" use="@TypeId"/>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/" name="TopLevelReport">
<html>
<head>
<title>Resharper InspectCode Report</title>
@ohader
ohader / rename-git-master-branch.sh
Created November 29, 2021 11:31
Rename Git master to main branch via GitHub API
#!/bin/bash
#
# replace `GITHUBTOKEN` with custom token from https://github.com/settings/tokens, having `repo` admin access
#
for repo in $(curl -s -H "Authorization: token GITHUBTOKEN" 'https://api.github.com/orgs/TYPO3-CMS/repos?per_page=100' | jq -r '.[] | .url' | sort)
do
echo "Renaming ${repo}..."
response=$(curl -s -X POST \
@gothburz
gothburz / colorama-class.py
Created March 19, 2020 21:41
Colorama Python Class
from colorama import init,Fore,Style
class PCOLOR:
# init() = Required for Colorama on Windows for Termcolor
init()
def __init__(self):
# COLORS
self.green = Fore.GREEN
self.red = Fore.RED
@gonchar
gonchar / a_visionOS_Xcode_snippets
Last active May 8, 2024 13:12
visionOS Xcode snippets
// hello
@shengjie-chen
shengjie-chen / gist:ba434a63c89ad8b081afee348db2f81c
Created May 3, 2024 05:59
Activity Watch的任务分类规则,适配我个人的工作习惯和使用的应用
{
"categories": [
{
"name": [
"Work"
],
"rule": {
"type": "regex",
"regex": "MathType|Excel|远程桌面连接|计算器|visio|WPS|vivado|siyuan|explorer.exe|IDM|vmware|Ditto|chrome|localsend_app|TencentDocs|word|SunloginClient|ppt|xilinx",
"ignore_case": true
@flrichar
flrichar / rancher-backup-version.md
Last active May 8, 2024 13:10
rancher backup version check

Check Rancher Backup tar.gz Version with x0f

...$ tar -xOf 010a-e3614234-218f-4666-9609-22b1e5743db6-2022-07-03T10-00-00Z.tar.gz settings.management.cattle.io#v3/server-version.json | jq .value
"v2.6.6"

Fun walk down history lane. Prints the versions of rancher backups found in a dir, from settings stdout.

  • find restore/backups/ -name '*.tar.gz' -exec tar -xOf {} settings.management.cattle.io#v3/server-version.json \; | jq -r .value
@mathcodes
mathcodes / dsa_pattern.md
Last active May 8, 2024 13:10
14 DSA Patterns to Master

14 Coding Patterns To Master

This is a collection of coding patterns I have learned to solve not only some of the most common problems, but the 14 patterns (yes, there are way more than 14, but the point here is taking 6 months of preparation and condensing it into a 30 minute read that would not take more than 1-2 weeks to master. I have found these problems and patterns to be the most useful in that the data structures and algorithms are used in many other problems and become familiar over time. Good luck!

Please feel free to comment if you got some value or find any errors!

Thanks!

Table of Contents

@dte
dte / install-CUDA-docker-nvidia-docker.sh
Created July 19, 2017 20:56
Install CUDA, Docker, and Nvidia Docker on a new Paperspace GPU machine
#!/bin/bash
# 1. Install CUDA
echo "Installing CUDA..."
# Only install if CUDA is not already installed.
if ! dpkg-query -W cuda; then
# The 16.04 installer works with 16.10.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
dpkg -i ./cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
apt-get update
apt-get install cuda -y
@v1mkss
v1mkss / JetBrains Activation.md
Last active May 8, 2024 13:09
JetBrains Activation

Choose any IDE from Jetbrains, then the activation window opens, go to the “Proxy Settings” and paste the following:

  • Manual proxy configuration http:
    • Hostname: localhost
    • port: 80
  • No proxy for:
*.apache.org, *.github.com, *.github.io, *.githubusercontent.com, *.gitlab.com, *.google.com, *.gradle.org, *.jetbrains.space, *.maven.org, cache-redirector.jetbrains.com, cloudconfig.jetbrains.com, download-cdn.jetbrains.com, download.jetbrains.com, downloads.marketplace.jetbrains.com, ea-report.jetbrains.com, github.com, gitlab.com, google.com, gradle.org, jcenter.bintray.com, plugins.jetbrains.com, resources.jetbrains.com, www.jetbrains.com

Activation Key:

@ayebrian
ayebrian / vmware.md
Last active May 8, 2024 13:08
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

vCenter Server 7

Key Tested