Skip to content

Instantly share code, notes, and snippets.

// Processing code by Etienne Jacob
// motion blur template by beesandbombs, explanation/article: https://bleuje.com/tutorial6/
// See the license information at the end of this file.
// see result here: https://mastodon.social/@bleuje/111706027080323463
//////////////////////////////////////////////////////////////////////////////
// Start of template
int[][] result; // pixel colors buffer for motion blur
@Joelkang
Joelkang / Dockerfile
Last active March 19, 2024 03:31
Dockerfile to create a container with the right deps to quantize models with MLC for CUDA 12.1
FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 as deps
SHELL ["/bin/bash", "--login", "-c"]
# Step 1. Set up Ubuntu
RUN apt update && apt install --yes wget ssh git git-lfs vim
# NOTE: libcuda.so.1 doesn't exist in NVIDIA's base image, link the stub file to work around
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/lib/x86_64-linux-gnu/libcuda.so.1
WORKDIR /root
@halcat0x15a
halcat0x15a / pipe.md
Last active March 19, 2024 03:30
Pipe

Pipeモナドの紹介

Scalaの記事です。Haskellはあまり書けません。

Iterateeの複雑さから開放されたいのでPipe系ライブラリ使いましょうという記事です。

Iterateeとの比較や簡単な使い方についてつらつらと書いていきます。

Iterateeについて

@minhcasi
minhcasi / Flutter Clean.md
Last active March 19, 2024 03:27
These are common issues on Flutter and solutions to fix

Quick Clean Cache

  1. Open android studio Tools->Flutter->Clean
  2. Go to File -> Invalidate Caches / Restart
  3. Or open terminal run "flutter clean"
  4. Remove pubspec.lock
  5. Double check the Flutter SDK Path config correcty - https://tppr.me/qn6dP

Or open the terminal and try this script:

flutter clean
@matthewzring
matthewzring / markdown-text-101.md
Last active March 19, 2024 03:27
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

@jegfish
jegfish / example_db.py
Last active March 19, 2024 03:26
Example code for connecting to and using a postgres database using discord.py and asyncpg.
# asyncpg docs: https://magicstack.github.io/asyncpg/current/
# This uses discord.py rewrite branch and .format(). If you are using the async branch of discord.py, it shouldn't matter much
# as only 'await ctx.send()' is something you should need to change. If you are using python 3.6+, you can use f strings as opposed to
# .format() for increased efficiency.
import discord
from discord.ext import commands
import asyncio
import asyncpg
@bUxEE
bUxEE / find_string.php
Last active March 19, 2024 03:25
find string in file (search in directory and subdirectories) php
<?php
$string = 'stringToSearch';
$dir = new RecursiveDirectoryIterator('folder');
foreach (new RecursiveIteratorIterator($dir) as $filename => $file) {
//$thename = $file->getFilename(); //uncomment this line and next to print names of all files scanned
//echo $thename.'<br />';
$content = file_get_contents($file->getPathname());
if (strpos($content, $string) !== false) {
@boyter
boyter / guid.py
Created November 8, 2022 05:18
Simply Python3 script to create guids that contain only 1337 speak
import random
def _replace(word):
replacements = {
'l': '1',
'i': '1',
's': '5',
't': '7',
'g': '9',
'q': '9',
@longtian
longtian / alpine-cloud-init.md
Last active March 19, 2024 03:19
cloud-init for alpine on proxmox

Enable cloud-init for a Alpine VM on proxmox

alpine version 3.17.4 cloud-init version 22.4

Install

Download alpine-virt-3.17.4-x86_64.iso Uploda to PVE Create a VM

@lmcneel
lmcneel / remove-node-modules.md
Last active March 19, 2024 03:18
How to remove node_modules after they have been added to a repo

How to remove node_modules

Create a .gitignore file

  1. Check for an existing .gitignore file in the project directory
ls -a