Skip to content

Instantly share code, notes, and snippets.

View stylemistake's full-sized avatar
👾
Hacker mindset

Aleksej Komarov stylemistake

👾
Hacker mindset
View GitHub Profile
@stylemistake
stylemistake / plugin-npmrc.cjs
Created November 8, 2024 12:35
Yarn plugin for importing configuration from .npmrc files
const logger = {
error: (...args) => console.error('plugin-npmrc:', ...args),
warn: (...args) => console.warn('plugin-npmrc:', ...args),
info: (...args) => console.info('plugin-npmrc:', ...args),
};
// A plugin to transparently load auth tokens from .npmrc files.
const plugin = {
name: 'plugin-npmrc',
/** @type {(require: NodeRequire) => unknown} */
@stylemistake
stylemistake / loadable.ts
Created September 15, 2022 06:09
Loadable
enum LoadableStates {
Initial = 'initial',
Loading = 'loading',
Error = 'error',
Value = 'value',
}
type LoadableInitial = Loadable & {
readonly state: LoadableStates.Initial;
};
@stylemistake
stylemistake / Trail3D.gd
Created August 22, 2022 12:25
Trail emitter, Godot 4
class_name Trail
extends Node3D
@export var emitting := false
@export_range(0.1, 100, 0.1, 'or_greater') var distance := 1.0
@export_range(0.1, 10, 0.1, 'or_greater') var lifetime := 1.0
@export_range(0.01, 10, 0.01, 'or_greater') var width_scale := 1.0
@export var width_curve: Curve
@export_range(0.01, 1, 0.01) var color_alpha := 1.0
@export var color_gradient: Gradient
@stylemistake
stylemistake / lsb.js
Last active September 19, 2015 23:52
Tool for getting out information hidden in LSB (steganography, nodejs)
'use strict';
var fs = require('fs');
// --------------------------------------------------------
// Get LSB data from buffer
// --------------------------------------------------------
function bufToLSB(buf, bufBits, bufLE, offset, length, lsbLE) {
@stylemistake
stylemistake / catalyst-temp.sh
Created September 3, 2015 21:59
Get temperature of Radeon card with Catalyst driver in celsius degrees.
#!/bin/bash
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
temp=`aticonfig --odgt 2>/dev/null | tail -1 | awk '{print $5}'`
echo ${temp%?}

Keybase proof

I hereby claim:

  • I am stylemistake on github.
  • I am stylemistake (https://keybase.io/stylemistake) on keybase.
  • I have a public key whose fingerprint is 6261 74AE 9437 FBBB D3E6 1638 0E84 EEE6 7EAE C195

To claim this, I am signing this object:

@stylemistake
stylemistake / textmoji.sh
Created May 24, 2015 21:18
Convert text to emoji-letters!
#!/bin/bash
## --------------------------------------------------------
## Textmoji v0.1
## Style Mistake <stylemistake@gmail.com>
## --------------------------------------------------------
declare -A charmap
eof=`echo -en '\x04'`
@stylemistake
stylemistake / chat.cfg
Created September 28, 2014 23:50
Chat shortcuts for Quake-like games
// chat.cfg
// --------------------------------------------------------
// Smileys
// --------------------------------------------------------
// smiley_happy
alias smiley_happy "say :)"
// smiley_sad
@stylemistake
stylemistake / wait.cfg
Last active August 29, 2015 14:05
Wait aliases for Quake-like games
// wait.cfg
alias wait2 "wait;wait;"
alias wait5 "wait;wait;wait;wait;wait;"
alias wait10 "wait5;wait5;"
alias wait25 "wait5;wait5;wait5;wait5;wait5;"
alias wait50 "wait25;wait25;"
alias wait75 "wait25;wait25;wait25;"
alias wait100 "wait25;wait25;wait25;wait25;"
alias wait125 "wait25;wait25;wait25;wait25;wait25;"
@stylemistake
stylemistake / weapons.cfg
Last active August 29, 2015 14:05
Advanced weapon bindings for Warsow
// weapons.cfg
// Advanced weapon bindings
// --------------------------------------------------------
// Internals
// --------------------------------------------------------
alias weap1 "use rl" // Fallback weapon
alias weap2 "wait" // Queued weapon