Skip to content

Instantly share code, notes, and snippets.

@fbaierl
fbaierl / ForkMITLicensedProject.md
Created November 6, 2018 14:17
HOWTO fork a MIT licensed project

No, you are not allowed to change the copyright notice. Indeed, the license text states pretty clearly:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

But you are allowed to add a copyright notice.

If you want to keep the MIT license, which is what I would advise you to do, you only need to add a single line to the license file, before or after Copyright (c) 2012 Some Name with your own copyright notice. The final LICENSE file will look like this:

The MIT License (MIT)

@magnetikonline
magnetikonline / README.md
Last active May 11, 2024 03:14
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@importRyan
importRyan / whenHovered.md
Last active May 11, 2024 03:13
Reliable SwiftUI mouse hover

Reliable mouseEnter/Exit for SwiftUI

Kapture 2021-03-01 at 14 43 39

On Mac, SwiftUI's .onHover closure is not always called on mouse exit, particularly with high cursor velocity. A grid of targets or with finer target shapes will often have multiple targets falsely active after the mouse has moved on.

It is easy to run back to AppKit's safety. Below is a SwiftUI-like modifier for reliable mouse-tracking. You can easily adapt it for other mouse tracking needs.

import SwiftUI
@axic
axic / EVMASM.md
Last active May 11, 2024 03:13
EVM Assembly Language

EVM Assembly Language

Motivation

The goal is to specify a syntax for an EVM assembly language, which can be used across various tools.

The format should be human readable, map EVM as closely as possible, allow for comments and refrain from complex syntax.

Specification

@edokeh
edokeh / index.js
Last active May 11, 2024 03:13
佛祖保佑,永无 BUG
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active May 11, 2024 03:09
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,

Cute Sparkles

These cool and girly glitters come with lots of flowers, hearts, bows and ribbons! These decorations can suit all sorts of happy and soft aesthetic moods ~ ✨(◕▿◕✿)

✧・゚: *✧・゚:*    *:・゚✧*:・゚✧
.・゜゜・  ・゜゜・.
。・゚゚・  ・゚゚・。
༶•┈┈⛧┈♛ ♛┈⛧┈┈•༶
✧༺♥༻∞  ∞༺♥༻✧

*✿❀ ❀✿*

@thedroidgeek
thedroidgeek / nokia-router-cfg-tool.py
Last active May 11, 2024 03:06
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
#include <metal_stdlib>
using namespace metal;
namespace JuliaSet {
/// HSV -> RGB
half3 hsv2rgb(half3 c) {
half3 rgb = clamp(abs(fmod(c.x * 6.0 + half3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0);
return c.z * mix(half3(1.0), rgb, c.y);
}
@Alex-Camman
Alex-Camman / index.html
Created May 11, 2024 03:00
Vue.js SVG sunset animation
<div id="app">
<div class="text-center">
<svg viewBox="0 0 1600 900" class="w-full">
<mask id="waterMask">
<rect fill="white" x="0" y="550" width="1600" height="350" />
</mask>
<Stars :time="time" />
<Moon :time="time" />