Skip to content

Instantly share code, notes, and snippets.

View Juknum's full-sized avatar
:shipit:

Julien Constant Juknum

:shipit:
View GitHub Profile
@Juknum
Juknum / object.ts
Created May 29, 2023 21:27
Prototypes extension to the Object interface
export {};
declare global {
interface Object {
/**
* Deep merge two or more objects into the first one
* @param {object} target The object to merge into
* @param {...object} sources The objects to merge into the target
*
* @example Object.merge({ a: 1, b: 2 }, { b: 3, c: 4 }) // { a: 1, b: 3, c: 4 }
@Juknum
Juknum / README.md
Created November 15, 2022 01:25
Small Image to SVG Converter

🖼️ Small image to SVG converter

📕 Requirements

This program require Python 3 and the Pillow module which you can install like so:

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade Pillow

🧾 Usage

@Juknum
Juknum / merge.js
Last active November 16, 2021 00:01
Object.merge(target, ...sources) : Deep merge for JS Objects
/** https://gist.github.com/Juknum/6750c0ec3a4249359b5be0641185f917 => Object.isObject(object) */
Object.defineProperty(Object.prototype, 'merge', {
/**
* @param {Object} target
* @param {...Object} sources
*/
value: (target, ...sources) => {
if (!sources.length) return target
const source = sources.shift()
@Juknum
Juknum / isObject.js
Last active November 16, 2021 00:00
Object.isObject(object) : Test if a JS Object is an Object
Object.defineProperty(Object.prototype, 'isObject', {
/**
* @param {*} item to be tested
* @returns {Boolean} true if the item is an JS Object
*/
value: (item) => { return (item && typeof item === 'object' && !Array.isArray(item)) }
})
/**
* Examples:
@Juknum
Juknum / autoexec.cfg
Last active February 14, 2023 01:21
CS:GO Config - 2023
// Content
// 1. Main Settings
// 2. Bindings
// 3. Crosshair
// 4. Hud
// 5. Radar
// 6. Mouse
// 7. Viewmodel
// 8. Bob
// 9. Network