Skip to content

Instantly share code, notes, and snippets.

View kengonakajima's full-sized avatar
🏠
Working from home

Kengo Nakajima kengonakajima

🏠
Working from home
View GitHub Profile
@voluntas
voluntas / zig_quic.md
Last active January 15, 2024 11:34
2022 年の夏休みに Zig で QUIC を実装してオープンソースとして公開するお手伝い

2022 年の夏休みに Zig で QUIC を実装してオープンソースとして公開するお手伝い

こちらの応募は終了しました、冬も募集予定です。

成果

@adrienjoly
adrienjoly / fix-dyld-missing-symbol-called-errors-on-m1-macs.md
Last active June 5, 2024 09:59
Fix `dyld[]: missing symbol called` errors when running Node.js programs on M1 Macs (apple silicon)

Problem

If you're getting this kind of error when running Node.js programs with binary dependencies that don't support M1 yet, e.g.:

$ yarn test
dyld[51175]: missing symbol called
dyld[51176]: missing symbol called
@fukuroder
fukuroder / wasapi_capture_and_render.cpp
Last active March 9, 2024 02:14
WASAPIでcaptureしてそのままrenderするサンプル
/*
* wasapi_capture_and_render.cpp
*
* Created by fukuroda (https://github.com/fukuroder)
*/
// STL
#include <iostream>
#include <vector>
@chockenberry
chockenberry / ScreenRecordingDetection.m
Created November 21, 2019 22:38
Detecting Screen Recording Permission in macOS Catalina
BOOL canRecordScreen = YES;
if (@available(macOS 10.15, *)) {
canRecordScreen = NO;
NSRunningApplication *runningApplication = NSRunningApplication.currentApplication;
NSNumber *ourProcessIdentifier = [NSNumber numberWithInteger:runningApplication.processIdentifier];
CFArrayRef windowList = CGWindowListCopyWindowInfo(kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
NSUInteger numberOfWindows = CFArrayGetCount(windowList);
for (int index = 0; index < numberOfWindows; index++) {
// get information for each window
@voluntas
voluntas / open_ayame.rst
Last active February 19, 2024 16:25
OpenAyame プロジェクト
@mapmakerdavid
mapmakerdavid / usable-gis-data-philippines.csv
Last active May 8, 2024 16:07
Usable GIS data about the Philippines
THEME FORMAT SOURCE LINK
roads, waterways, building footprints, points of interest shp, pbf OpenStreetMap (OSM) http://download.geofabrik.de/asia/philippines.html
administrative boundaries (country, region, province, municipality, city) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-administrative-levels-0-to-3
administrative boundaries (barangay) shp PSA, NAMRIA, DROMIC, UNOCHA, and patners https://data.humdata.org/dataset/philippines-admin4-boundaries-barangay
framework data (boundaries, roads, elevation, population, etc.) various DIVA-GIS http://www.diva-gis.org/gdata
topographic maps (1:50,000 and 1:250,000) non-georeferenced raster NAMRIA http://www.namria.gov.ph/download.php
various geohazards shp NOAH http://noah.up.edu.ph/downloads/
various geohazards shp DREAM https://lipad.dream.upd.edu.ph/
various geohazards shp MGB http://www.namria.gov.ph/download.php
various geohazards shp PHIVOLCS http://www.phivolcs.dost.gov.ph/
@voluntas
voluntas / open_momo.rst
Last active March 1, 2024 13:51
OpenMomo プロジェクト
@CGPala
CGPala / UILineRenderer.cs
Created November 19, 2016 12:29
Unity simple UI line renderer
using UnityEngine;
using UnityEngine.UI;
using System.Collections.Generic;
public class UILineRenderer : Graphic
{
[SerializeField] Texture m_Texture;
[SerializeField] Rect m_UVRect = new Rect(0f, 0f, 1f, 1f);
* 平行光源の光の強さは、光源の方向のみに依存するので、各頂点の明るさは、法線 n と、光源の方向 l の内積(の関数)になります。
* 反射光の光の強さは、ライトベクトルと視線への反射ベクトルのハーフベクトルと面法線の内積で計算します。
* 環境光は計算量が多いので、単に色を乗せるだけで済ませます。
※ライトベクトルおよび視線の反射ベクトルは、モデルの回転に対する逆行列を掛けることで正しく表示されます。
ライトが固定して、ポリゴンが回る=ポリゴンを固定して、ライトを逆方向に回す
```
<script id="vs" type="x-shader/x-vertex">
attribute vec3 position; // 頂点属性:頂点座標位置
/*****************************************************************************
* directsound.c: DirectSound audio output plugin for VLC
*****************************************************************************
* Copyright (C) 2001-2009 VLC authors and VideoLAN
* $Id: 2f5b9f46d3739e513d875b950eaf4d2df641f9dc $
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by