Skip to content

Instantly share code, notes, and snippets.

View Fuwn's full-sized avatar
✒️
亀の甲より年の功

Fuwn Fuwn

✒️
亀の甲より年の功
View GitHub Profile
const path = require('path');
const config = require('../config.js');
const fs = require('fs');
const sharp = require('sharp');
const ffmpeg = require('fluent-ffmpeg');
const utilsController = {};
utilsController.videoExtensions = ['.webm', '.mp4', '.wmv', '.avi', '.mov'];
utilsController.generateThumbs = function(file, basedomain) {
@Fuwn
Fuwn / PM2 Cheat Sheat
Last active June 22, 2021 21:25
PM2 Cheat Sheat
# Fork mode
pm2 start app.js --name my-api # Name process
# Cluster mode
pm2 start app.js -i 0 # Will start maximum processes with LB depending on available CPUs
pm2 start app.js -i max # Same as above, but deprecated.
pm2 scale app +3 # Scales `app` up by 3 workers
pm2 scale app 2 # Scales `app` up or down to 2 workers total
# Listing
@Fuwn
Fuwn / ConsoleColour.h
Last active January 23, 2020 07:52
Windows specific console out text colour changer.
// Usage:
// std::cout << COLOUR_HERE << "Text";
// Example:
// std::cout << red << "Text";
//
// You can also make new colours by combing the base RGB colours.
// FOREGROUND_RED, FOREGROUND_GREEN, FOREGROUND_BLUE are the base colours.
// FOREGROUND_INTENSITY gives vibrance. The colour name can be changed by
// changing; inline std::ostream& THIS_VALUE_HERE(std::ostream& s)
@Fuwn
Fuwn / Request-AES-Key.js
Last active April 2, 2020 03:05
Request AES Key.
// You must have jQuery installed to use this script.
//
// --- How to use: ---
// 1. Install jQuery if not already installed.
// 2. Move THIS script into a safe directory.
// 3. Call THIS script in head via <script src="/path/to/Request-AES-Key.js"></script>
// 4. Copy THIS span tag and include somewhere on page; <span id="serverTime"></span>
// 5. Done.
var settings = { // Settings
@Fuwn
Fuwn / Animated-Favicon.js
Last active April 15, 2025 16:45
A simple way to use a .gif as a favicon.
// Before attempting, use https://gifmaker.me/exploder/ to cut .gif into each frame.
var favicon_images = [
'http://website.com/img/tmp-0.gif',
'http://website.com/img/tmp-1.gif',
'http://website.com/img/tmp-2.gif',
'http://website.com/img/tmp-3.gif',
'http://website.com/img/tmp-4.gif',
'http://website.com/img/tmp-5.gif',
'http://website.com/img/tmp-6.gif'
@Fuwn
Fuwn / CS2Blender.md
Last active June 22, 2021 21:29
A semi-easy way to import Counter-Strike models into Blender
  1. Navigate to the game folder, then use GCFScape to open the .vpk files and extract the model(s).
  2. Use Crowbar to decompile the .mdl models into .smd model(s).
  3. Use VTFEdit to decompile the .vtf textures for the model(s) into .png textures.
  4. Use the addon Blender Source Tools to import .smd model(s) into Blender.
@Fuwn
Fuwn / counter-incrament-boldening.scss
Last active June 22, 2021 21:29
Counter Increment Boldening
/* Counter Increment Boldening */
ol {
margin: 0 0 1.5em;
padding: 0;
counter-reset: item;
}
ol>li {
margin: 0;
padding: 0 0 0 2em;
@Fuwn
Fuwn / Memory.h
Last active September 26, 2022 20:07
CSGO Memory Addressing
#pragma once
#include <Windows.h>
#include <TlHelp32.h>
#include <iostream>
class MemoryManager {
private:
DWORD dwPID; // CS:GO process ID
@Fuwn
Fuwn / force-install-steam.bat
Last active March 19, 2025 15:02
A simple Batch script to force install Steam without administrator permissions on Windows
cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" "SteamSetup.exe"
@Fuwn
Fuwn / CPU Hierarchy 2019.md
Last active August 17, 2019 13:27
CPU Hierarchy 2019.
/ Gaming Score Application Score CPU Cores/ Threads Base/ Boost TDP
AMD Ryzen 9 3900X ~ ~ Zen 2 12 / 24 3.8 / 4.6 GHz 105W
Intel Core i9-9900K ~ ~ Coffee Lake-R 8 / 16 3.6 / 5.0 GHz 95W
Intel Core i9-9900KF ~ ~ Coffee Lake-R 8 / 16 3.6 / 5.0 GHz 95W
AMD Ryzen 7 3800X ~ ~ Zen 2 8 / 16 3.9 / 4.5 GHz 105W
AMD Ryzen 7 3700X ~ ~ Zen 2 8 / 16 3.6 / 4.4 GHz 65W
Intel Core i7-9700K ~ ~ Coffee Lake-R 8 / 8 3.6 / 4.9 GHz 95W
Intel Core i7-8700K 100 70.4 Coffee Lake 6 / 12 3.7 / 4.7 GHz 95W
Intel Core i7-8700 99.98 61.1 Coffee Lake 6 / 12 3.2 / 4.6 GHz 65W