Skip to content

Instantly share code, notes, and snippets.

View ulcuber's full-sized avatar

Victor S. ulcuber

  • FrameWorkTeam
  • GMT+4
View GitHub Profile
modid count
mcp 18574
FML 18574
minecraft 15632
forge 15632
jei 12846
forgelin 11616
chisel 11237
baubles 11101
crafttweakerjei 10589
@yyogo
yyogo / spliterr.sh
Last active January 23, 2024 10:37
Split stderr from comand to separate tmux pane
#!/bin/bash
set -m
showhelp() {
echo "Usage: $0 [-ohvrc] <command>"
echo "Pipes stderr from command to a new tmux pane."
echo " -h | -v split horizontally or vertically (default vertically)"
echo " -r send stdout to pane instead of stderr"
echo " -o send both stdout and stderr to new panes"
echo " -c close pane automatically after program terminates"
@mareq
mareq / ale_coc.vim
Created April 12, 2021 01:14
CoC & ALE vim configuration
" ALE (#NA; https://vimawesome.com/plugin/ale)
"
" CoC is used as the default choice in this ALE-CoC-mixed configuration. ALE is used only as a fallback for running
" scripts which CoC can not run. In order to make the behaviour uniform, regardless of how the linters are being run,
" this configuration makes CoC send its code-diagnostics to ALE and ALE is used to display them.
" GENERAL BEHAVIOUR
" Disable LSP features in ALE (offloaded to CoC)
" https://github.com/dense-analysis/ale#5iii-how-can-i-use-ale-and-cocnvim-together
" with :CocConfig and add `"diagnostic.displayByAle": true`
@Hrommi
Hrommi / gist:7e4eda7f9d562c1c3e3a819650157a94
Created February 17, 2021 09:24
Vimium для русской раскладки
# Insert your preferred key mappings here.
map , showHelp
map о scrollDown
map л scrollUp
map р scrollLeft
map д scrollRight
map пп scrollToTop
map П scrollToBottom
map яР scrollToLeft
@kesyog
kesyog / i3 multiple monitors.md
Last active December 1, 2023 12:54
Configuring multiple displays with i3

Configuring multiple displays with i3

Motivation

I've run into a few common issues running i3 on a laptop with external monitors.

  • When running i3, external monitors aren't always detected properly.
  • When running multiple displays with different resolutions, text scaling is inconsistent.
  • I'd like to be able to automatically change configurations if I unplug my external monitor(s), plug in a projector, etc.
@3v1n0
3v1n0 / vscode-unused-workspace-storage-cleanup.sh
Last active January 29, 2025 18:43
VSCode unused workspaceStorage cleanup
#!/bin/bash
CONFIG_PATH=~/.config/Code
for i in $CONFIG_PATH/User/workspaceStorage/*; do
if [ -f $i/workspace.json ]; then
folder="$(python3 -c "import sys, json; print(json.load(open(sys.argv[1], 'r'))['folder'])" $i/workspace.json 2>/dev/null | sed 's#^file://##;s/+/ /g;s/%\(..\)/\\x\1/g;')"
if [ -n "$folder" ] && [ ! -d "$folder" ]; then
echo "Removing workspace $(basename $i) for deleted folder $folder of size $(du -sh $i|cut -f1)"
const PNG = require('pngjs-image')
const colors = [
{ red: 0, green: 0, blue: 0, alpha: 0 },
{ red: 89, green: 125, blue: 39, alpha: 255 },
{ red: 109, green: 153, blue: 48, alpha: 255 },
{ red: 127, green: 178, blue: 56, alpha: 255 },
{ red: 67, green: 94, blue: 29, alpha: 255 },
{ red: 174, green: 164, blue: 115, alpha: 255 },
{ red: 213, green: 201, blue: 140, alpha: 255 },
{ red: 247, green: 233, blue: 163, alpha: 255 },
@lluiscab
lluiscab / map.js
Last active September 5, 2024 22:58
Mineflayer map
const mineflayer = require('mineflayer')
const PNGImage = require('pngjs-image');
if (process.argv.length < 4 || process.argv.length > 6) {
console.log('Usage : node echo.js <host> <port> [<name>] [<password>]')
process.exit(1)
}
const bot = mineflayer.createBot({
@loilo
loilo / pass-slots.md
Last active February 20, 2025 09:47
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@gaearon
gaearon / minification.md
Last active January 28, 2025 19:19
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal: