Skip to content

Instantly share code, notes, and snippets.

https://ascii-generator.site/
░░░░░░░░░░░░▄▄░░░░░░░░░
░░░░░░░░░░░█░░█░░░░░░░░
░░░░░░░░░░░█░░█░░░░░░░░
░░░░░░░░░░█░░░█░░░░░░░░
░░░░░░░░░█░░░░█░░░░░░░░
███████▄▄█░░░░░██████▄░
▓▓▓▓▓▓█░░░░░░░░░░░░░░█░
▓▓▓▓▓▓█░░░░░░░░░░░░░░█░
@dkebler
dkebler / widevine.sh
Last active March 15, 2024 21:08
Install WidevineCDM into chromium
#!/bin/bash
# -eux
function confirm()
{
echo -n "$@ "
read -e answer
for response in y Y yes YES Yes Sure sure SURE OK ok Ok
do
if [ "_$answer" == "_$response" ]
then
@izuolan
izuolan / worker.js
Last active July 6, 2023 15:15
Custom domain for your Craft.do pages. Demo: https://next-craft.vercel.app and Tutorial: https://zuolan.me/en/next_craft_en
// Your domain name
const MY_DOMAIN = 'note.example.com'
// Website language
const LANG = 'en'
// Favicon url
const FAVICON_URL = 'https://example.com/favicon.ico'
// Your config page link
@ben-doyle
ben-doyle / perforce.MD
Last active July 5, 2024 03:47
Perforce for git users.

Understanding Perforce (as a git user).

Commands

Git Perforce Command Line P4V Notes
git pull p4 sync get latest revision
n/a p4 update ? Get latest revision without overwriting files that have been changed.
git checkout p4 edit checkout You plan to change a file from the version control system
git commit p4 submit submit
git push n/a n/a No perforce equivalent. There is no concept of a pure local submit in Perforce.
@shuhei
shuhei / symbol.js
Created September 4, 2018 21:23
symbol.js
const fs = require('fs');
const path = require('path');
class Node {
constructor(start, end, depth) {
this.start = start;
this.end = end;
this.middle = Math.floor((start + end) / 2);
this.items = [];
this.left = null;
@shuhei
shuhei / README.md
Last active April 13, 2022 07:34
Fixing wrong symbols in Node.js CPU Frame Graphs

Fixing wrong symbols in Node.js CPU Frame Graphs

Motivation

I have been generating CPU Flame Graphs of Node.js applications with Linux perf command, and noticed that some of the graphs have suspicious labels. For example, with a sandbox project and Node 10.8.0, I got LazyCompile:*a.renderDOM /opt/app/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:35 where it should have been something related to streams.

For example, the following is a stack trace from perf script that I used to genearte a CPU Flame Graph. 227bbdff955b has a label LazyCompile:*a.renderDOM, but it doesn't make much sense that React.renderDOM was called from _stream_readable.js and parsed JSON in it.

node 22640 56531.256247:   10101010 cpu-clock: 
@noelbundick
noelbundick / LICENSE
Last active May 24, 2024 09:10
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Voronoff
Voronoff / wsl_setup.md
Last active September 29, 2023 16:41
Windows development in 2018: Setting up a coding environment using Windows Subsystems for Linux (WSL), Hyper, and Visual Studio Code (vscode) with Python.

If you're here just for the section on vscode working with Python on WSL, jump here.

Creating a modern development environment in Windows

Windows is now a development environment that can compete with Mac and Linux. Windows Subsystems for Linux lets you have an Ubuntu (or other Linux flavor) installation that works near seemlessly inside of Windows. Hyper Terminal running WSL's Bash and Visual Studio Code feel really nice to code in. These are instructions for getting set up and smoothing out most of the remaining rough edges. I've included a section on getting vscode to work well with Python and WSL, but the general pattern should be usable for any unsupported language (as of now, I believe it's only Node.js that has WSL support in vscode).

Table of Contents

Libraries and Tools for React

If you're developing an application based on React it can be helpful if you don't need to develop all the basic UI components yourself. Here you can find a list with various components, component libraries and complete design systems developed with and for React.

As the list got longer and longer I thought it would be better to have a "real" site for it.

👉 Please find the (new) list here: https://react-libs.nilshartmann.net/