Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
@ksasao
ksasao / ContactTracingAppFinder.ino
Last active December 7, 2020 18:33
接触確認アプリが有効になっているかを調べるアプリです。数十センチ程度まで近づくと素早く点滅します。M5 Atom 用です。https://twitter.com/ksasao/status/1274385507565178885 参照。Apache 2.0ライセンスです。
#include <M5Atom.h>
#include <BLEDevice.h>
// Contact Tracing Bluetooth Specification (Apple/Google)
// https://blog.google/documents/58/Contact_Tracing_-_Bluetooth_Specification_v1.1_RYGZbKW.pdf
const char* uuid = "0000fd6f-0000-1000-8000-00805f9b34fb";
bool found = false;
class MyAdvertisedDeviceCallbacks: public BLEAdvertisedDeviceCallbacks {
void onResult(BLEAdvertisedDevice advertisedDevice) {
@mala
mala / twitter_crawl.pl
Created May 10, 2020 14:21
一個前の記事用に書いた Twitter Profile 収集するやつ
use strict;
use Net::Twitter;
use MongoDB;
my $nt = Net::Twitter->new(
traits => [qw/API::RESTv1_1/],
consumer_key => "xxx",
consumer_secret => "xxx",
access_token => "xxx",
access_token_secret => "xxx",
@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@udzura
udzura / yawaraka-docker.md
Last active June 16, 2022 23:34
やわらかDocker
@mtei
mtei / helix_keyboard_build_tool_memo.md
Last active August 24, 2023 08:19
キーボード自作、特に Helix キーボードキットの製作に最低必要な工具のメモ
@mrry
mrry / tensorflow_self_check.py
Last active August 24, 2023 17:13
[DEPRECATED] TensorFlow on Windows self-check
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@knowsuchagency
knowsuchagency / typecheck.py
Last active January 22, 2024 12:19
A cell magic to enable the use of mypy within jupyter notebooks
"""
Add mypy type-checking cell magic to jupyter/ipython.
Save this script to your ipython profile's startup directory.
IPython's directories can be found via `ipython locate [profile]` to find the current ipython directory and ipython profile directory, respectively.
For example, this file could exist on a path like this on mac:
/Users/yourusername/.ipython/profile_default/startup/typecheck.py
@lavn0
lavn0 / LINQX.cs
Last active March 23, 2017 12:34
using System.Collections.Generic;
using System.Diagnostics;
namespace System.Linq
{
/// <summary>LINQ Extension</summary>
[DebuggerStepThrough]
public static partial class LINQX
{
public static bool? MixedResult<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)