Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
enjoying corona, hbu

Mia Lilian VottusCode

💭
enjoying corona, hbu
View GitHub Profile
@VottusCode
VottusCode / link_binaries.sh
Created Apr 3, 2022
Link binaries one-liner (example on jdk/bin)
View link_binaries.sh
@VottusCode
VottusCode / rebuild_dkms_modules.sh
Created Mar 16, 2022
Rebuild DKMS modules for all kernel versions
View rebuild_dkms_modules.sh
ls /var/lib/initramfs-tools | \
sudo xargs -n1 /usr/lib/dkms/dkms_autoinstaller start
@VottusCode
VottusCode / webpack.config.js
Created Feb 20, 2022
My go-to webpack encore config
View webpack.config.js
const encore = require("@symfony/webpack-encore");
const fs = require("fs");
const path = require("path");
const frontend = path.join(__dirname, "frontend/");
const output = path.join(__dirname, "public", "build");
// Checks whether NODE_ENV is set to dev/development, otherwise defaults to production.
const env = ["dev", "development"].includes(String(process.env.NODE_ENV).toLowerCase())
? "development"
@VottusCode
VottusCode / _deploy.js
Last active Feb 17, 2022
My serverfull deploy/setup scripts
View _deploy.js
/**
* Script that deploys the application to an FTP/SFTP server.
*/
const {params, credentials, deploy: deployConfig} = require("./utils")
const {exec} = require("better-exec");
const {Deploy} = require("@vottuscode/deploy-script");
const {SftpFileRemote} = require("@remotefull/file");
const {SshCmdRemote} = require("@remotefull/commander");
const deploy = new Deploy(
View apt-manager.js
const {BaseCmdRemote} = require("@remotefull/commander/dist/remote/BaseCmdRemote")
class AptCommandError extends Error {
/**
* Raw command output.
* @type {string[]|null}
*/
rawOut;
/**
@VottusCode
VottusCode / remove_ps_eval.sh
Created Aug 24, 2021
Remove PhpStorm evaluation (Linux)
View remove_ps_eval.sh
rm ~/.config/JetBrains/PhpStorm*/options/other.xml
rm ~/.config/JetBrains/PhpStorm*/eval/*
rm -rf .java/.userPrefs
@VottusCode
VottusCode / build.sh
Created Aug 2, 2021
prisma-client-go binaries/publish.sh without the publish stuff
View build.sh
#!/bin/sh
set -eux
v="$1"
mkdir -p build
cd build
npm init --yes
npm i "pkg" --dev
@VottusCode
VottusCode / bump-deps-major.js
Last active Aug 27, 2021
Small JS script to bump all Yarn dependencies to the latest version available. Supports Yarn workspaces.
View bump-deps-major.js
const { exec } = require('child_process')
const path = require('path')
const glob = require('glob').sync
const bumpDeps = async (depsList, dev = false, workspace) => {
for (const dependency in depsList) {
await new Promise((resolve, reject) => {
const _workspace = workspace ? `workspace ${workspace}` : '-W'
const _devFlag = dev ? '-D' : ''
@VottusCode
VottusCode / nohiber.sh
Created Apr 30, 2021
Fuck Hiberfile right off your drive. Just rewrite /dev/sda to your Windows drive.
View nohiber.sh
if ! [ $(id -u) = 0 ]; then
echo "You need to run this script as root (or use sudo)." >&2
exit 1
fi
if grep -qs '/dev/sda4 ' /proc/mounts; then
echo '/dev/sda4 is already mounted, proceeding to unmount'
umount /dev/sda4
if [ $? -eq 0 ]; then
@VottusCode
VottusCode / build.gradle.kts
Created Apr 26, 2021
Explicitly set UTF-8 in Gradle (build.gradle.kts)
View build.gradle.kts
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>{
options.encoding = "UTF-8"
}