Skip to content

Instantly share code, notes, and snippets.

@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 24, 2024 11:00
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9
@amishmm
amishmm / ArchOracleCloud.md
Last active April 24, 2024 11:00
Install Arch Linux on Oracle Cloud (Free Tier)

Requirement

  • Console / Cloud Shell access (via https://cloud.oracle.com)
  • Go to the instance page and under Resources -> Console connection -> Launch Cloud Shell connection

Steps

  1. In Ubuntu OR any other Free tier Linux OS
# Download Alpine Linux and install it on disk
cd /
wget https://dl-cdn.alpinelinux.org/alpine/v3.16/releases/x86_64/alpine-virt-3.16.2-x86_64.iso
@denguir
denguir / cuda_install.md
Last active April 24, 2024 10:59
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@lawrenceching
lawrenceching / install-frp-as-systemd-service.sh
Last active April 24, 2024 10:57
Install frp as systemd service
# Update on 2024/04/13
# 1. Improved OS compatibility: try wget and then curl for downloading files.
#
# Update on 2024/01/26
# 1. Thanks to GitHub user @aka-Ani, this script now will install latest version of frp:
# https://gist.github.com/lawrenceching/41244a182307940cc15b45e3c4997346?permalink_comment_id=4851742#gistcomment-4851742
# 2. Use .toml conf file as .ini became lagacy
#
# Update on 2023/06/19
# 1. frp no longer provide systemctl service file. This script creates frpc/fprs systemctl service file by itself
@kktse
kktse / README.md
Created October 19, 2023 20:28
Installing brlaser CUPS drivers for printing on Apple Silicon Macs and Brother printers

Installing brlaser CUPS drivers for printing on Apple Silicon Macs and Brother printers

Problem

You own a Mac running MacOS and want to print a document using a Brother printer. You also prefer not to use MacPorts because you have another package maanger installed.

Environment

  • I used a 2021 Macbook Pro 14" running Sonoma 14.0
  • I am using Homebrew as a package manager
@wpweb101
wpweb101 / woo-vou-unlimited-code-params.php
Last active April 24, 2024 10:53
Woocommerce PDF Vouchers - Modify Unlimited voucher codes pattern logic
<?php
// You can modify / remove following fields using the filter
// buyername, code_prefix, order_id, data_id, $item_id
// $voucher_codes = array( 'buyername' => $buyername, 'code_prefix' => $code_prefix, 'order_id' => $order_id, 'data_id' => $data_id, 'item_id' => $item_id, 'separator' => '-' );
function woo_vou_unlimited_code_pattern_modification( $voucodes_args = array() ) {
if( $voucodes_args['buyername'] ) {// if you want to remove buyername from pattern
unset( $voucodes_args['buyername'] );
}
@dhh
dhh / pagination_controller.js
Last active April 24, 2024 10:53
HEY's Stimulus Pagination Controller
/*
ERB template chunk from The Feed's display of emails:
<section class="postings postings--feed-style" id="postings"
data-controller="pagination" data-pagination-root-margin-value="40px">
<%= render partial: "postings/snippet", collection: @page.records, as: :posting, cached: true %>
<%= link_to(spinner_tag, url_for(page: @page.next_param),
class: "pagination-link", data: { pagination_target: "nextPageLink", preload: @page.first? }) unless @page.last? %>
</section>
@mendhak
mendhak / apigateway.tf
Last active April 24, 2024 10:52
Terraform - API Gateway with greedy path (proxy+) calling httpbin. Also includes deployment
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.0"
}
}
}
provider "aws" {
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active April 24, 2024 10:52
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@lepikhinb
lepikhinb / .aliases
Created October 1, 2022 23:23
Bash aliases for common commands
# Git
alias wip="git add .; git commit -m 'wip'"
alias push="git push"
# PHP
alias c="composer"
alias pest='./vendor/bin/pest'
alias pint='./vendor/bin/pint'
alias stan='./vendor/bin/phpstan'