Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"log"
"net"
"net/http"
"os"
)
@mash
mash / main.go
Last active February 13, 2022 21:47
atmega32u4が品切れだった時に電子部品サイトの在庫をscrapeするくん
package main
import (
"fmt"
"github.com/PuerkitoBio/goquery"
"net/url"
"os"
"regexp"
"strconv"
"strings"
<html>
<head>
<script src="keyserializer.js"></script>
<script type="text/javascript">
console.log( keyserializer.serialize({
security : keyserializer.SECURITY_WPA_WPA2,
ssid : "IRKitTester",
password : "irkitone",
devicekey : "0123456789ABCDEF0123456789ABCDEF"
}) );
@mash
mash / gist:281e8e5ee7188a659213c7ecc363e3b2
Last active April 8, 2020 13:25
An architecture design for tracking COVID-19 proximity that incorporates privacy
Backend publishes 2 APIs
1. Fetch Near-to-Infected list
Near-to-Infected list entry consists of:
- userIDs that have been near to an infected person
- Time when the userID was near an infected person
This can be a static text file that gets updated when E-2 happens.
2. Append Near-to-Infected list
This is going to be called when a person was diagnosed as positive.
See E.
@mash
mash / audio.swift
Created September 22, 2017 10:50
audio stuff on macOS
//
// File.swift
// AudioSwitcher
//
// Created by Masakazu Ohtsuka on 2017/09/22.
// Copyright © 2017 maaash.jp. All rights reserved.
//
import Foundation
import Cocoa

Keybase proof

I hereby claim:

  • I am mash on github.
  • I am mash (https://keybase.io/mash) on keybase.
  • I have a public key whose fingerprint is B20F C3F8 1332 474D BEE5 756F B14D 63DA 2192 B977

To claim this, I am signing this object:

@mash
mash / Dockerfile
Last active November 28, 2016 11:56
FROM golang:1.7
# golang + ruby:2.3
# from https://github.com/docker-library/buildpack-deps/blob/master/jessie/Dockerfile
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
bzip2 \
/*
* Based on http://amzn.to/1LzFrj6
*/
var applicationId = "";
var clientkey = "";
var deviceid = "";
var ir = {
on: {"format":"raw","freq":38,"data":[6648,3228,873,2368,873,873,968,968,873,968,873,968,968,968,968,968,873,968,968,968,873,968,873,968,968,968,968,2451,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,873,2451,873,873,873,2451,873,2451,873,2451,873,2451,873,2451,873,2451,873,873,873,2451,968,2368,968,2368,873,2368,873,2368,873,2368,873,2368,873,2368,873,2368,873,873,873,968,873,968,873,968,968,968,968,968,873,968,873,968,873,873,968,968,968,2451,873,2451,873,968,873,968,968,2368,904,2368,904,2368,904,2368,904,904,904,904,904,2368,904,2368,904,904,904,904,904,904,904,2368,904,904,904,904,904,2368,904,904,904,904,904,2368,904,2368,904,904,904,2368,904,2368,904,904,904,2368,904,2368,904,904,904,2368,904,2368,904,904,904,904,904,2368,904,904,904,904,904,904,904,904,904,904,904,2368,904,2368,904,904,904,2368,9
@mash
mash / prettyprintgist.md
Created July 1, 2016 08:38 — forked from magnetikonline/README.md
Bookmarklet to pretty print Gist pages without the usual page chrome, just content. Handy for Markdown document printing.

Pretty print bookmarklet helper for Gist pages

Create a new bookmark somewhere handy in your browser with the following URL:

javascript:var el=document.createElement('style');el.media='print';el.innerHTML='#header,.pagehead.repohead,.gist-description.container,.file-box .meta,#comments,.js-comment-form,.gist-header,.file-header,.gisthead,#footer{display:none;}.file-box{border:0!important;}';document.getElementsByTagName('head')[0].appendChild(el);alert('Now, cmd+p to print');
  • Navigate to your Gist of choice
  • Hit the bookmarklet
  • Now print
#include "ets_sys.h"
#include "osapi.h"
#include "user_interface.h"
#include "user_devicefind.h"
#include "user_webserver.h"
#include "user_iot_version.h"
#include "common/common.h" // ALIGNED
#include "user_persistent_variables.h"