Skip to content

Instantly share code, notes, and snippets.

View magic-akari's full-sized avatar

magic-akari

View GitHub Profile
@magic-akari
magic-akari / .gitignore
Last active July 30, 2022 02:44
jest_workaround example
node_modules
.swc
output
@magic-akari
magic-akari / install Homebrew.sh
Last active November 17, 2021 14:54
install Homebrew
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/Homebrew/install@HEAD/install.sh)"
@magic-akari
magic-akari / build_qbt_dmg.sh
Last active September 12, 2021 06:40 — forked from Kolcha/build_qbt_dmg.sh
script to build qBittorrent master branch on macOS, no Homebrew required!
#!/bin/bash
# standalone script to build qBittorent for macOS (including Apple Silicon based Macs)
#
# only Xcode must be installed (Xcode 12 is required to produce arm64 binaries)
# all required dependencies and tools are automatically downloaded and used only from script's working directory
# (can be specified), nothing is installed into the system
# working directory is removed on completion if it was not specified
#
# by default script produces binaries for the architecture it was launched on, but cross-compilation is also supported
# in both directions, i.e. x86_64 -> arm64 and arm64 -> x86_64
const promisePool = <T>(list: Iterable<() => PromiseLike<T>>, limit: number): Promise<T[]> => {
const result: Promise<T>[] = [];
const iterator = list[Symbol.iterator]();
return new Promise((resolve, reject) => {
const settle = (next: ReturnType<typeof iterator["next"]>) => {
if (next.done) {
Promise.all(result).then(resolve, reject);
return;
@magic-akari
magic-akari / README.md
Last active March 2, 2019 04:19
EDGE IMPORT TEST

This is a test demo for Edge. You may need a static file server to view the demo page.

Lit-element test

This file is used to be tracked and identified by https://lrc-maker.github.io
@magic-akari
magic-akari / .gitignore
Created December 9, 2018 01:27
tsc bug demo 2
node_modules
dist
@magic-akari
magic-akari / app.tsx
Last active December 7, 2018 16:19
tsc bug demo
export class App extends React.Component {
readonly state = { clicked: 0 };
onClick = () => this.setState({ clicked: this.state.clicked + 1 });
public render() {
return (
<div>
<div>You have clicked {this.state.clicked}</div>
<button onClick={this.onClick}>click me</button>
@magic-akari
magic-akari / ConvertToHEIC.js
Last active September 12, 2019 13:21 — forked from sinoru/ConvertToHEIC.swift
ConvertToHEIC
#!/usr/bin/env osascript -l JavaScript
ObjC.import("Foundation");
ObjC.import("ImageIO");
ObjC.import("AVFoundation");
const quality = 0.8;
function run(input) {
for (const file of input) {