Skip to content

Instantly share code, notes, and snippets.

@dragonfire1119
dragonfire1119 / how-to-ssh-into-a-proxmox-container.md
Created June 19, 2023 13:32
How to SSH into a Proxmox container

Proxmox

So if you're using Proxmox you need to open up ssh and run the following commands:

  1. Setup a root password
sudo passwd root
@lopspower
lopspower / README.md
Last active April 25, 2024 12:17
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@SahilK-027
SahilK-027 / KMP.cpp
Last active April 25, 2024 12:16
KMP
// String p # s
// S: a a b # a a b a a b a a b
// LPS: 0 1 0 0 1 2 3 1 2 3 1 2 3
vector<int> KMP(string& s){
vector<int> LPS(s.length(), 0);
for(int i = 1 ; i < s.length(); i++){
int prev_idx = LPS[i-1];
while(prev_idx > 0 && s[i] != s[prev_idx]){
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
ignorePatterns: ["dist", ".eslintrc.cjs"],
@Xynonners
Xynonners / AHAA.gdshader
Last active April 25, 2024 12:15
new godot antialiasing (Absurd Hybrid Anti-Aliasing)
shader_type spatial;
render_mode unshaded, depth_prepass_alpha;
void vertex() {
POSITION = vec4(VERTEX, 1.0);
}
uniform sampler2D BackBufferTex : hint_screen_texture, repeat_disable, filter_nearest;
uniform sampler2D DepthBufferTex : hint_depth_texture, repeat_disable, filter_nearest;

Gambaran umum

Struktur folder ini dibuat berdasarkan prinsip enkapsulasi dan modularisasi. Jadi kodingan-kodingan yang ada dipisah-pisah menjadi modul-modul kecil sesuai fungsi masing masing. Dalam menjalankan fungsinya, setiap modul tidak boleh ada ketergantungan langsung dengan modul yang lain. Di projek android ini secara umum ada beberapa fungsi:

  1. Fetch API
    • Model
    • Proses Request dan Response
    • Autentikasi
  2. Token Management (storage)
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 25, 2024 12:14
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@knowbody
knowbody / RNfontWeights.js
Created July 14, 2016 13:42
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black

Install Jellyfin on Termux [In Proot]

This guide shows two methods of installing Jellyfin on termux

Note: only tested on aarch64/arm64

These steps are same for both methods:

  1. Update the repo
pkg update
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active April 25, 2024 12:11
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)