Skip to content

Instantly share code, notes, and snippets.

View tonosaman's full-sized avatar

Optional Exit of T.Ono tonosaman

View GitHub Profile
pkgs.stdenv.mkDerivation
{
name = "code-server";
src = pkgs.fetchurl
(
let
INSTALL_ARCH = "x86_64";
INSTALL_TARGET = "unknown-linux-gnu";
in
{
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@slikts
slikts / Linuxifying Windows.md
Last active September 4, 2023 07:30
Linuxifying Windows

nelabs.dev

Linuxifying Windows for development

This guide is for 'linuxing-up' Windows as a development environment; it focuses on setting up [WSL], an Ubuntu Hyper-V virtual machine, [wsltty] (a nice terminal emulator) and various tweaks.

Rationale

@domenkozar
domenkozar / kiosk-chromium.nix
Last active January 24, 2024 14:05
Boot NixOS into chromium kiosk (tested on NixOS 14.04)
services.xserver = {
enable = true;
monitorSection = ''
Option "NODPMS"
'';
serverLayoutSection = ''
Option "BlankTime" "0"
Option "DPMS" "false"
'';
displayManager.auto.user = "guest";
@joinAero
joinAero / camera.py
Created May 19, 2017 06:36
Use Kinect with OpenCV (Python)
import cv2
import sys
class Camera(object):
def __init__(self, index=0):
self.cap = cv2.VideoCapture(index)
self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2)
self.fps = 0
# BCM2837 Raspberry Pi 3 Target
tcl_port 5555
telnet_port 4444
gdb_port 3333
transport select jtag
adapter_khz 1000
module Main where
import Prelude (Unit(), unit, pure, ($), (<$>), (<#>), map, bind, show, void, const, (++), (==))
import Data.Maybe (Maybe(..), fromMaybe)
import Data.Either (either)
import Data.Array (updateAt, take, drop, findIndex, head, tail, replicate)
import Data.Traversable (for)
import Data.Functor ((<$))
import Control.Monad.Aff (Aff(), runAff)
import Control.Monad.Eff (Eff())
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,.site-footer,.repository-sidebar,.file-navigation,.gh-header-meta,.gh-header-actions,#wiki-rightbar,#wiki-footer,.commit-tease').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); var removeMe = document.getElementsByClassName("file-header")[0]; removeMe.parentNode.removeChild(r
@koyhoge
koyhoge / gist:20b4570adcfc2bcab5da
Last active November 23, 2019 09:40
エンジニアのための法律勉強会 #3『判例に学ぶ、納期遅延と瑕疵担保責任についての注意事項』参加メモ

エンジニアのための法律勉強会 #3『判例に学ぶ、納期遅延と瑕疵担保責任についての注意事項』参加メモ

  • 日時: 2015-04-123 19:15-20:50
  • 講師: 野島 梨恵氏 (東京山王法律事務所)
  • 場所: Co-Edo

http://bit.ly/co-edo-2015-04-23-doc

  • 初参加の方が半分くらい
# 2017年9月以降は Flash ではなく m3u8 での配信になりましたので、この内容は古くなりました。
# 新しい録音方法に関しては
# https://gist.github.com/riocampos/93739197ab7c765d16004cd4164dca73
# をご覧ください。
##############################################################################
# RTMPEのtype9 handshakeに対応している必要があるのでRTMPDump v2.4必須
# ラジオ第2は全放送局とも同じ
# swfVfyオプションのURLは http://www3.nhk.or.jp/netradio/files/swf/rtmpe.swf でもOK
# 各チャンネルに2種類ずつ記載していますがどちらも同じなので好みの物を使ってください