Skip to content

Instantly share code, notes, and snippets.

View seungha-kim's full-sized avatar

seungha-kim

View GitHub Profile
@mchapman87501
mchapman87501 / install_pyside6_mac_m1.sh
Created October 1, 2021 18:47
Install PySide6 on macOS (Monterey) for M1 (Apple Silicon) Devices - h/t elliewhatever
#!/bin/bash
# Many thanks to
# https://gist.githubusercontent.com/elliewhatever/adbe3fba37d747fb8b04af8f835d46d2/raw/61e2bd530eb434f7ea2f595262e1922cdd057f7c/PySide6.sh
# Assumes brew and python are installed
brew install qt@6 llvm cmake ninja git
# Setup environment relative to current directory -
# this eases building in an existing Python venv.
mkdir -p ./.pyside6; cd ./.pyside6
@graninas
graninas / What_killed_Haskell_could_kill_Rust.md
Last active November 5, 2024 02:15
What killed Haskell, could kill Rust, too

At the beginning of 2030, I found this essay in my archives. From what I know today, I think it was very insightful at the moment of writing. And I feel it should be published because it can teach us, Rust developers, how to prevent that sad story from happening again.


What killed Haskell, could kill Rust, too

What killed Haskell, could kill Rust, too. Why would I even mention Haskell in this context? Well, Haskell and Rust are deeply related. Not because Rust is Haskell without HKTs. (Some of you know what that means, and the rest of you will wonder for a very long time). Much of the style of Rust is similar in many ways to the style of Haskell. In some sense Rust is a reincarnation of Haskell, with a little bit of C-ish like syntax, a very small amount.

Is Haskell dead?

@sisoje
sisoje / DeinitBlock.swift
Last active August 18, 2020 15:01
Resource acquisition is initialization (RAII) in Swift: Implementation
class DeinitBlock {
let onDeinit: () -> Void
init(_ block: @escaping () -> Void) {
onDeinit = block
}
deinit {
onDeinit()
}
}
@prideout
prideout / servewasm.py
Created November 8, 2018 00:44
Python WASM server
#!/usr/bin/env python3
import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update({
'.wasm': 'application/wasm',
@505aaron
505aaron / App.test.js
Last active July 21, 2020 08:15
createPortal Mock for react-test-renderer
jest.mock('react-dom');
import React from 'react';
import { createPortal } from 'react-dom';
import renderer from 'react-test-renderer';
import ShallowRenderer from 'react-test-renderer/shallow';
import ReactDOM from 'react-dom';
class Drop extends React.Component {
constructor(props) {
@lattner
lattner / TaskConcurrencyManifesto.md
Last active November 15, 2024 05:45
Swift Concurrency Manifesto
@rakannimer
rakannimer / add-react-jest-airbnb-linting.sh
Last active August 14, 2018 07:42
Adding react-airbnb styleguide linting to create-react-app
( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"; )
yarn add babel-eslint
echo "{
\"parser\": \"babel-eslint\",
\"env\": {
\"browser\": true,
\"node\": true,
\"jest\": true,
},
\"extends\": \"airbnb\",
@Jamesits
Jamesits / caddy.sh
Last active January 27, 2024 14:47
Install Caddy Server on Ubuntu with Systemd.
# Should work on all Debian based distros with systemd; tested on Ubuntu 16.04+.
# This will by default install all plugins; you can customize this behavior on line 6. Selecting too many plugins can cause issues when downloading.
# Run as root (or sudo before every line) please. Note this is not designed to be run automatically; I recommend executing this line by line.
apt install curl
curl https://getcaddy.com | bash -s personal dns,docker,dyndns,hook.service,http.authz,http.awses,http.awslambda,http.cache,http.cgi,http.cors,http.datadog,http.expires,http.filemanager,http.filter,http.forwardproxy,http.geoip,http.git,http.gopkg,http.grpc,http.hugo,http.ipfilter,http.jekyll,http.jwt,http.locale,http.login,http.mailout,http.minify,http.nobots,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.reauth,http.restic,http.upload,http.webdav,net,tls.dns.auroradns,tls.dns.azure,tls.dns.cloudflare,tls.dns.cloudxns,tls.dns.digitalocean,tls.dns.dnsimple,tls.dns.dnsmadeeasy,tls.dns.dnspod,tls.dns.dyn,tls.
@sagivo
sagivo / gist:3a4b2f2c7ac6e1b5267c2f1f59ac6c6b
Last active November 1, 2024 11:38
webRTC stun / turn server list
to check if the server works - https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice
stun:
stun.l.google.com:19302,
stun1.l.google.com:19302,
stun2.l.google.com:19302,
stun3.l.google.com:19302,
stun4.l.google.com:19302,
stun.ekiga.net,
stun.ideasip.com,
@cherta
cherta / actionCreators.js
Created January 19, 2016 17:19
redux-simple-router and sagas
export function retrieve(nodeId) {
return { type: 'RETRIEVE_NODE', payload: { nodeId: nodeId } }
}
export function show(nodes) {
return { type: 'SHOW_NODE', payload: { nodes: nodes } }
}