Skip to content

Instantly share code, notes, and snippets.

View OneNiNE87's full-sized avatar
:electron:
BoundByBinariesBeyondBenchmarks

иiɴᴇ[ᴏɴᴇ]ᴏɴᴇ OneNiNE87

:electron:
BoundByBinariesBeyondBenchmarks
View GitHub Profile
@HimDek
HimDek / gist:ebaeac76babd871c68ebd7c4162ae1ba
Last active April 9, 2025 03:04
Deploy Private GitHub repo of Express, React or Django app in AWS EC2 with Domain and free SSL

Comprehensive Guide for Deploying Express, React, and Django Apps on AWS EC2 with SSL (Using Deploy Keys and PM2 for Express)

1. Launch an EC2 Instance

  1. Launch an EC2 instance on AWS with an appropriate configuration (Ubuntu, t2.micro, etc.) and ensure it is publicly accessible.
  2. Configure Security Groups:
    • Open ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) to allow web traffic.
@dg
dg / gist:72bc9f585a068d2e9c4edc5ae4c6d9ee
Created October 6, 2024 01:19
gpt-4o-canmore system prompt
## canmore
// # The `canmore` tool creates and updates text documents that render to the user on a space next to the conversation (referred to as the "canvas").
// Lean towards NOT using `canmore` if the content can be effectively presented in the conversation. Creating content with `canmore` can be unsettling for users as it changes the UI.
// ## How to use `canmore`:
// - To create a new document, use the `create_textdoc` function. Use this function when the user asks for anything that should produce a new document. Also use this when deriving a new document from an existing one.
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
const folder = "";
/* Optional tags */
let tags = "clippings";
@andypiper
andypiper / chrome-tabs.sh
Created October 27, 2023 21:34
Recover suspended tabs
chrome-cli list links | rg suspended\.html > tabs.txt
while read -r line; do tabid=`echo $line | cut -c 2-11`; url=`echo $line | awk -F "uri[=]" '{print $NF}'`; chrome-cli open $url -t $tabid; done < tabs.txt
@legendSabbir
legendSabbir / main.js
Created October 17, 2023 16:09
Path Autocomplete
import plugin from "../plugin.json";
const { editor } = editorManager;
const fsOperation = acode.require("fsOperation");
const helpers = acode.require("helpers");
const TokenIterator = ace.require("ace/token_iterator").TokenIterator;
const cache = Object.create(null);
const pathCompleter = {
id: "path-completion",
getCompletions: async function (editor, session, pos, prefix, callback) {
@notune
notune / imagen.py
Last active October 12, 2023 10:42
Use Google Imagen
import re
import requests
import json
import base64
# SET THESE VALUES
PROJECT_ID = "<REPLACE_WITH_YOUR_PROJECT_ID_HERE>"
TOKEN = "<REPLACE_WITH_YOUR_TOKEN_HERE>"
PROMPT = "futuristic portrait of mona lisa, canon eos 5d mark iii, 50mm f/1.4 usm lens"
@gitclone-url
gitclone-url / Boot image extraction guide.md
Last active April 22, 2025 09:25
Guide on how to extract boot image from any android phone without needing to root using magisk and without custom recovery.

Boot Image Extraction Guide

Guide on how to extract a boot image from any Android phone without needing to root using Magisk and without a custom recovery.

Most Android users face hurdles when attempting to root their phones because they require a boot image for patching, and custom recoveries specifically designed for their devices are often unavailable. Additionally, finding the phone firmware online can be challenging. As a result, rooting such phones becomes a daunting task. In this guide, I'll provide a comprehensive solution for users who want to extract the boot image from their phone without the need to root it first, download firmware from the internet, or rely on custom recoveries.

Getting started!

Before diving into the guide, please thoroughly review the Frequently Asked Questions (FAQ) to understand the basics of GSI and the various naming conventi

@Birch-san
Birch-san / CUDA-12-1-1-pytorch.md
Last active February 2, 2025 20:31
Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Should you keep your NVIDIA driver?

CUDA 12.1.1 toolkit is gonna offer to install Nvidia driver 530 for us. It's from New Feature branch. It's likely to be newer than the default Nvidia driver you would've installed via apt-get (apt would prefer to give you 525, i.e. Production Branch).

If you're confident that you already have a new enough Nvidia driver for CUDA 12.1.1, and you'd like to keep your driver: feel free to skip this "uninstall driver" step.

But if you're not sure, or you know your driver is too old: let's uninstall it. CUDA will install a new driver for us later.

Installing Cool-Retro-Term on Windows10

First of all, this document is just a recompilation of different resources that already existed on the web previously that I personally tested some ones did work and other not. I liked the idea to make a full guide from start to end so all of you could also enjoy playing with cool-retro-term on windows 10. Personally I installed it on a windows 10 pro version. Fingers crossed!

result

@danielgxm
danielgxm / discord_bot.py
Last active February 17, 2025 06:43
Discord自动聊天机器人,撸白名单必备!
# -*- coding: utf-8 -*-
"""
@Time : 2021/10/3 19:18
@Auth : d1rrick DanielGao.eth
@File :autochat.py
@IDE :vscode
"""
import requests
import json