Skip to content

Instantly share code, notes, and snippets.

View SomethingGeneric's full-sized avatar
🙃
hrrrg

Matt C SomethingGeneric

🙃
hrrrg
View GitHub Profile
@sexnine
sexnine / jokes.py
Created October 5, 2021 01:48
Slash commands in cogs - Pycord
from discord.ext import commands
import discord
from . import api
from typing import Optional
from discord.app import Option
slash_categories = {
...
}
@seia-soto
seia-soto / arm64e-linux.sh
Created July 5, 2020 11:21
Installs sbinger's arm64e toolchain to allow arm64e compilation on Linux
curl -LO https://github.com/sbingner/llvm-project/releases/download/v10.0.0-1/linux-ios-arm64e-clang-toolchain.tar.lzma
TMP=$(mktemp -d)
tar --lzma -xvf linux-ios-arm64e-clang-toolchain.tar.lzma -C $TMP
pushd $TMP/ios-arm64e-clang-toolchain/bin
find * ! -name clang-10 -and ! -name ldid -and ! -name ld64 -exec mv {} arm64-apple-darwin14-{} \;
find * -xtype l -exec sh -c "readlink {} | xargs -I{LINK} ln -f -s arm64-apple-darwin14-{LINK} {}" \;
popd
mkdir -p $THEOS/toolchain/linux/iphone
mv $TMP/ios-arm64e-clang-toolchain/* $THEOS/toolchain/linux/iphone/
rm -rf $TMP linux-ios-arm64e-clang-toolchain.tar.lzma
# ============================================================
# GLFW dependency
# ============================================================
message(STATUS "GLFW dependency")
set(glfw_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/glfw")
set(glfw_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/glfw")
set(glfw_CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${glfw_INSTALL_DIR}
-DGLFW_BUILD_EXAMPLES=OFF
@Dhanvesh
Dhanvesh / Win10Activation.txt
Created June 5, 2018 17:37
Windows 10 Activation Batch File
@echo off
title Windows 10 ALL version activator&cls&echo ************************************&echo Supported products:&echo - Windows 10 Home&echo - Windows 10 Professional&echo - Windows 10 Enterprise, Enterprise LTSB&echo - Windows 10 Education&echo.&echo.&echo ************************************ &echo Windows 10 activation...
cscript //nologo c:\windows\system32\slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9 >nul
cscript //nologo c:\windows\system32\slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2 >nul
@diffficult
diffficult / installing_virt_manager.md
Last active May 21, 2024 18:42
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

# note - excludes __ and _ items
['author',
'contributors',
'coordinates',
'created_at',
'destroy',
'entities',
'favorite',
'favorite_count',
'favorited',
#!/bin/sh
# view here:
# https://i.stack.imgur.com/OK3po.png
e=$'\e['
for n in {0..7}; do
printf "${e}"'38;05;'"${n}"'m%-6s' '('"$n"') '
done
@camilstaps
camilstaps / WritingPseudocode.md
Last active March 31, 2023 02:13
How to write good pseudocode

How to write good Pseudocode

This is an unfinished list of remarks on how to write good pseudocode.

What is pseudocode?

Pseudocode is a loosely defined way of transmitting the concept of an algorithm from a writer to a reader. Central is the efficiency of this communication, not the interpretability of the code by an automated program (e.g., a parser).

@mrkpatchaa
mrkpatchaa / README.md
Last active May 22, 2024 05:49
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

@sameersbn
sameersbn / gitlab.conf
Created February 6, 2015 09:53
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;