Skip to content

Instantly share code, notes, and snippets.

@chpio
chpio / Object_fromEntries.ts
Created May 28, 2021 10:41
Object.fromEntries typescript
interface ObjectConstructor {
fromEntries<T extends readonly [PropertyKey, unknown]>(
entries: Iterable<T>,
): { [K in T[0]]?: Extract<T, readonly [K, unknown]>[1] };
}
@chpio
chpio / unlicensed_code.md
Last active February 28, 2019 10:14
unlicensed code

So, the other possibility is that authors deliberately reject the legal system per se. The reasoning can go as follows: I do care about my peers using my software. I don't give a damn about whether the lawyers and mega-corporations they work for use it. So, if you are like me and you don't care about all the intellectual property antics, here's my project, feel free to use it. If you are the kind of moron who wants to have their legal ass covered, go screw yourself.

Put this way, publishing without license is a much more radical statement than GPL is. Where RMS says: "You can use my stuff if you buy into the idea of free software," people publishing without license say: "You can use my stuff if you are willing to ignore the law." It's a bit like when you want to join mafia and they ask you to beat an innocent bystander to prove your contempt for the rule of law.

-- http://250bpm.com/blog:82

@chpio
chpio / systemd_ipfs.md
Created November 7, 2016 00:03
Systemd + ipfs

/etc/systemd/system/ipfs.service

[Unit]
Description=IPFS daemon
After=network.target

[Service]
User=ipfs
Environment="IPFS_PATH=/data/ipfs"
ExecStart=/usr/bin/ipfs daemon
#!/bin/sh
find . -type f -regextype posix-extended -regex ".*\.(php|js|hbs|html|scss|module)" -exec sed -i "s/[[:space:]]*$//" {} \;