Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / webrtc_sfu_dev.rst
Last active March 28, 2024 12:31
WebRTC SFU コトハジメ

WebRTC SFU コトハジメ

日時

2023-12-03

voluntas

バージョン

2023.1

url

https://voluntas.github.io

この記事が良いと思ったらこの記事に Star をお願いします

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 12:31
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@ihor-lev
ihor-lev / sublime_fix_home_end_keys.md
Last active March 28, 2024 12:30
Fix Sublime Text Home and End key usage on Mac OSX

Sublime Text Home/End keys default functionality jumps to the beginning and end of the file.

Fix Home and End keys to move the cursor to the beginning and end of lines.

Preferences > Key Bindings - User

Adding the following to the array:

{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },

Pansharpening notes, mid-2021

First posted in August 2021. This is basically a snapshot of my thinking about pansharpening at that time; I’m not making any substantial updates. Last typo and clarity fixes in February 2023.

Preface

This is a collection of notes on how I’ve been approaching convolutional neural networks for pansharpening. It’s an edited version of an e-mail to a friend who had asked about this tweet, so it’s informal and somewhat silly; it’s not as polished as, say, a blog post would be. It’s basically the advice I would give to an image processing hobbyist before they started working on pansharpening.

If you want a more serious introduction, start with the literature review in Learning deep multiresolution representations for pansharpening. Most of the academic work I would recommend is mentioned there.

@noelbundick
noelbundick / Dockerfile
Last active March 28, 2024 12:26
Consuming packages from a private Azure Pipelines Python artifact feed
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image
FROM python:3.6-alpine AS builder
ARG INDEX_URL
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL
COPY requirements.txt .
RUN pip install -U pip \
&& pip install --user -r requirements.txt
@7468696e6b
7468696e6b / okular-appleSilicon.md
Last active March 28, 2024 12:26
how to install Okular viewer on macOS Big Sur, using M1/Apple Silicon/arm64
  1. Install homebrew from https://brew.sh/ (follow the instructions there)
  2. tap the https://invent.kde.org/packaging/homebrew-kde/ repo, brew tap kde-mac/kde https://invent.kde.org/packaging/homebrew-kde.git
  3. brew edit okular, workaround now is to comment out or delete the line depends_on "chmlib" (won't compile on macos arm64 for now as of 2021-08-18), then save (if using vim you need to first press i to insert/type, when saving then <esc> then :wq then <enter>.
  4. brew install okular, wait for stuff to compile and/or install
  5. It may ask for keychain credentials (to sign the binaries? because of mac arm64 security policy https://eclecticlight.co/2021/01/26/when-you-dont-have-permission-to-run-an-app-on-an-m1-mac/)
  6. $(brew --repo kde-mac/kde)/tools/do-caveats.sh
  7. Now okular is in your $HOME/Applications/KDE folder, and will show up in Launchpad! You can view pdf, djvu, etc documents.
@jakebrinkmann
jakebrinkmann / connect_psycopg2_to_pandas.py
Created July 3, 2017 14:19
Read SQL query from psycopg2 into pandas dataframe
import pandas as pd
import pandas.io.sql as sqlio
import psycopg2
conn = psycopg2.connect("host='{}' port={} dbname='{}' user={} password={}".format(host, port, dbname, username, pwd))
sql = "select count(*) from table;"
dat = sqlio.read_sql_query(sql, conn)
conn = None
@mahemoff
mahemoff / README.md
Last active March 28, 2024 12:23
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@mateuszkwiatkowski
mateuszkwiatkowski / vscode-remote-ssh-freebsd.md
Last active March 28, 2024 12:22
Configure FreeBSD to work with VScode's remote ssh extension

This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.

  1. Enable linuxulator and install linux userland:
    # sysrc linux_enable="YES"
    # service linux start
    # pkg install linux_base-c7