Skip to content

Instantly share code, notes, and snippets.

;; Challenge: find all the bugs in this small functional compiler
#lang racket
(provide (all-defined-out))
(define verbose-mode (make-parameter #t))
(define i-am-a-mac (make-parameter #f))
;;
;; Our compiler will have several layers
@thecodeholic
thecodeholic / php.json
Created February 26, 2024 19:29
PHP/Laravel Live snippets for VSCode
{
"Create public function": {
"prefix": "pubf",
"body": [
"public function $1()",
"{",
"\t$2",
"}",
],
"description": "Create public function"
@auramagi
auramagi / WaterfallLayout.swift
Created June 27, 2022 10:52
Waterfall Layout with SwiftUI Layout protocol
import SwiftUI
struct ContentView: View {
typealias Item = (Color, CGFloat)
@State private var columnCount = 3
@State private var isWaterfall = true
@State var items: [Item] = [
@JuniorDjjr
JuniorDjjr / fakeMainOutputFile.sc
Created November 11, 2021 17:39
SA main.scm source code leaked from GTA SA The Definitive Edition
This file has been truncated, but you can view the full file.
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
// ****************************************PC SA Main Script********************************
// *****************************************************************************************
// *****************************************************************************************
// *****************************************************************************************
SCRIPT_NAME MAIN //NEW MAIN
@disler
disler / README.md
Last active January 6, 2025 11:45
Four Level Framework for Prompt Engineering
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active January 6, 2025 11:45 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@teocci
teocci / how-to-ssh-into-windows.md
Created October 13, 2022 08:07
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@wasulabenjamin
wasulabenjamin / How to activate Sublime Text Build 4180 x64.md
Last active January 6, 2025 11:43
How to activate Sublime Text Build 4189 x64.md

Activate Sublime Text Build 4189 x64

  1. Go to https://hexed.it/
  2. Click Open File in the top left corner, navigate to instalation folder and select sublime_text.exe
  3. Press CTRL + F or on the Search for bar in the left panel and look for: 80 79 05 00 0F 94 C2
  4. Now in the editor, click on the first byte (80) and start replacing each byte by: C6 41 05 01 B2 00 90
  5. Finally, in the top left corner again, click on Save as and replace the old executable file with the newly created one.

Enjoy an Unlimited User License!

@kvba5
kvba5 / guns-uploader.user.js
Created January 6, 2025 11:41
Adds 2 new upload buttons to Image Host page
// ==UserScript==
// @name Guns.lol Uploader
// @namespace kvba5.guns-uploader
// @version 2025-01-06
// @description Allows you to upload images directly from the site
// @author kvba5
// @match https://guns.lol/imagehost
// @icon https://www.google.com/s2/favicons?sz=64&domain=guns.lol
// @grant unsafeWindow
// @run-at document-start
@Nadrieril
Nadrieril / shell.nix
Last active January 6, 2025 11:35
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 13.0 for my maguro (Samsung Galaxy Nexus GSM) phone
# The build instructions for normal Linuxes are here: https://wiki.lineageos.org/devices/maguro/build
# For NixOS, follow those instructions but skip anything related to installing packages
# Detailed instructions:
# cd into an empty directory of your choice
# copy this file there
# in nix-shell:
# $ repo init -u https://github.com/LineageOS/android.git -b cm-13.0
# $ repo sync
# $ source build/envsetup.sh