Skip to content

Instantly share code, notes, and snippets.

@pablotolentino
pablotolentino / Visual Studio 2022 Product Key
Created November 20, 2021 20:41
Visual Studio 2022 Enterprise Product key
Visual Studio 2022
Enterprise :
VHF9H-NXBBB-638P6-6JHCY-88JWH
Professional:
TD244-P4NB7-YQ6XK-Y8MMM-YWV2J
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 10, 2024 00:16
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active May 10, 2024 00:14
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@degitgitagitya
degitgitagitya / .env
Last active May 10, 2024 00:12
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
## Will successfully install amdgpu drivers and rocm,
## but pointless as there is no gpu device attached to WSL2 (only CUDA and DirectML is supported, not /dev/kfd or amd gpus)
## ROCM/HIP
sudo apt update
sudo apt dist-upgrade
sudo apt install libnuma-dev
wget -q -O - http://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
@Faria-Ejaz
Faria-Ejaz / Map.js
Last active May 10, 2024 00:09
react Leaflet Map with Auto-suggest Search #leaflet #react-leaflet #search
/** @format */
import { Map, TileLayer, Marker, Popup } from "react-leaflet";
import React, { useEffect, useState, useRef } from "react";
import { geosearch } from "esri-leaflet-geocoder";
import "leaflet/dist/leaflet.css";
import "esri-leaflet-geocoder/dist/esri-leaflet-geocoder.css";
import L from "leaflet";
function MapView(props) {
// Convert the format string from moment's "L" to a format usable by
// [bootstrap-datepicker][1].
//
// Call it with:
//
// momentFormatToDatePicker(moment.localeData().longDateFormat("L")).
//
// [1]: https://bootstrap-datepicker.readthedocs.org/en/latest/options.html#format
function momentFormatToDatePicker(format) {
// The actual translation is more detailed:
// script tags are HTML, don't put them in JavaScript Files.
// <script type="text/javascript" src="js/jquery.min.js"></script>
// <script type="text/javascript">
// Indent your code! It organizes levels and lets you know what statements are in what scope.
// Organization is key in programming, Don't make it harder for yourself.
$(document).ready(function() {
$(document).on('click', '.day', function() {
$('.times-' + this.value).toggle();
});
@sukima
sukima / BetterCommitMessages.md
Last active May 10, 2024 00:08
My guidelines for writing better commit messages