Skip to content

Instantly share code, notes, and snippets.

@choco-bot
choco-bot / Install.txt
Created May 2, 2024 20:25
charissil v5.0 - Failed - Package Tests Results
==> default: Running provisioner: shell...
[ERROR] An error occurred in the underlying SSH library that Vagrant uses.
[ERROR] The error message is shown below. In many cases, errors from this
[ERROR] library are caused by ssh-agent issues. Try disabling your SSH
[ERROR] agent or removing some keys and try again.
[ERROR] If the problem persists, please report a bug to the net-ssh project.
[ERROR] timeout during server version negotiating
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Cube with Image Texture</title>
<style>
body {
margin: 0;
padding: 0;
@felixjones
felixjones / pmx21.md
Last active May 2, 2024 20:23
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@garg-aayush
garg-aayush / Steps_multiple_cuda_environments.md
Last active May 2, 2024 20:19
Managing multiple CUDA versions using environment modules in Ubuntu

Steps to manage multiple CUDA environments

This gist contains all the steps required to:

  • Install multiple CUDA versions (e.g., CUDA 11.3 and CUDA 11.8).
  • Manage multiple CUDA environments on Ubuntu using the utility called environment modules.
  • Use this approach to avoid CUDA environment conflicts.

Environment Modules is a package that provides for the dynamic modification of a user's environment via modulefiles. You can find more on it at https://modules.readthedocs.io/en/latest/

1. Install the Compatible NVIDIA Drivers (if required)

// ==UserScript==
// @name TweetXer
// @namespace https://gist.github.com/lucahammer/a4d1e957ec9e061e3cccafcbed599e16/
// @version 0.5
// @description Delete all your Tweets for free.
// @author Luca
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?domain=twitter.com
// @grant unsafeWindow
// ==/UserScript==
@nowl
nowl / perlin.c
Created February 15, 2011 19:04
Perlin Noise in C
#include <stdio.h>
static int SEED = 0;
static int hash[] = {208,34,231,213,32,248,233,56,161,78,24,140,71,48,140,254,245,255,247,247,40,
185,248,251,245,28,124,204,204,76,36,1,107,28,234,163,202,224,245,128,167,204,
9,92,217,54,239,174,173,102,193,189,190,121,100,108,167,44,43,77,180,204,8,81,
70,223,11,38,24,254,210,210,177,32,81,195,243,125,8,169,112,32,97,53,195,13,
203,9,47,104,125,117,114,124,165,203,181,235,193,206,70,180,174,0,167,181,41,
164,30,116,127,198,245,146,87,224,149,206,57,4,192,210,65,210,129,240,178,105,
@Pandry
Pandry / Firewalld GeoIP firewall script
Last active May 2, 2024 20:18
Block countries IPs via Firewalld
#!/bin/bash
##
# Name: GeoIP Firewall script
# Author: Pandry
# Version: 0.1.1
# Description: This is a simple script that will set up a GeoIP firewall blocking all the zones excecpt the specified ones
# it is possible to add the whitelisted zones @ line 47
# Additional notes: Usage of [iprange](https://github.com/firehol/iprange) is suggested
# for best performances
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>3D Cube Renderer</title>
<style>
body {
margin: 0;
padding: 0;
@oianmol
oianmol / platform.android.kt
Created May 19, 2023 10:01
Jetpack Compose Side Effect to update Android or iOS status-bar and navigation-bar color
@Composable
actual fun PlatformColors(statusBarColor: Color, navBarColor: Color){
val sysUiController = rememberSystemUiController()
SideEffect {
sysUiController.setSystemBarsColor(color = topColor)
sysUiController.setNavigationBarColor(color = bottomColor)
}
}
[
{ code: 'AD', label: 'Andorra', phone: '376', phoneLength: 6},
{ code: 'AE', label: 'United Arab Emirates', phone: '971', phoneLength: 9},
{ code: 'AF', label: 'Afghanistan', phone: '93', phoneLength: 9},
{ code: 'AG', label: 'Antigua and Barbuda', phone: '1-268', phoneLength: 10},
{ code: 'AI', label: 'Anguilla', phone: '1-264', phoneLength: 10},
{ code: 'AL', label: 'Albania', phone: '355', phoneLength: 9},
{ code: 'AM', label: 'Armenia', phone: '374', phoneLength: 6},
{ code: 'AO', label: 'Angola', phone: '244', phoneLength: 9},
{ code: 'AQ', label: 'Antarctica', phone: '672', phoneLength: 6},