Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

プライバシーポリシー

個人情報保護基本方針

Increments株式会社(以下、「当社」といいます)は、当社がお預かりする様々な個人情報に対し、個人情報保護の社会的重要性を鑑み以下の方針に基づき個人情報の保護に努めます。

個人情報保護基本方針

  1. 当社は、個人情報を取得する際には、法令で例外として定められる場合を除き、利用目的を通知又は公表し、適法かつ公正な手段によって取得いたします。また、特定した利用目的の達成に必要な範囲を超えた、個人情報の目的外利用はいたしません。
@yumetodo
yumetodo / get.sh
Created April 9, 2020 15:49
Elecom WRC-2533GHBK-lのログを取得してgitで管理するスクリプト
#!/bin/bash
# --no-gpg-sign
curl -u admin:zlu9jhmhk5qqbb5k_cheh4itwoxdq7 http://192.168.2.1/tmp_logmsg.log > raw.log
if [ $(wc -l < raw.log) -lt 1 ]; then
wc -l < raw.log
git reset --hard HEAD
else
if git add raw.log; then
if git commit -m "update" --no-gpg-sign; then
echo "updated"
abusaidm.html-snippets
annsk.alignment
bbenoist.Doxygen
bierner.markdown-emoji
bierner.markdown-mermaid
BriteSnow.vscode-toggle-quotes
bungcip.better-toml
castwide.solargraph
cdsama.shell-snippets
christian-kohler.npm-intellisense
@yumetodo
yumetodo / 20190827.vsconf
Created August 27, 2019 08:42
20190827.vsconf
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Component.CoreEditor",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Component.NuGet",
"Microsoft.Net.Component.4.6.1.TargetingPack",
"Microsoft.VisualStudio.Component.Roslyn.Compiler",
"Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
"Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions",
const fetch = require("node-fetch")
const lastWatchDate = 20181222;
const main = async () => {
const s = await fetch("http://www.ytv.co.jp/conan/data/story.json").then(r => r.json());
const items = s.item.filter(s => s.oaDateId > lastWatchDate).reverse();
let re = "";
for (const item of items) {
const storyNum = item.story_num.startsWith("R") ? item.story_num.substring(1) : item.story_num;
re += `名探偵コナン第${storyNum}話 ${item.title}` + '\n';
}
--- Source/cmAffinity.cxx 2019-07-07 23:36:47.702310000 +0900
+++ Source/cmAffinity.cxx 2019-07-07 23:36:50.924838300 +0900
@@ -3,7 +3,7 @@
#include "cmAffinity.h"
#include "cm_uv.h"
-
+#include <string.h>
#ifndef CMAKE_USE_SYSTEM_LIBUV
# ifdef _WIN32
@yumetodo
yumetodo / unique_factorization.hpp
Created December 24, 2018 10:40
素因数分解
#include <iostream>
#include <cstdint>
#include <vector>
#include <cmath>
struct unique_factorization_element {
std::uint32_t prime;
std::uint8_t pow;
};
std::ostream& operator<< (std::ostream& os, const unique_factorization_element& e)
{
@yumetodo
yumetodo / contiguous_iterator.hpp
Last active December 17, 2018 11:11
inferior vector util
#ifndef INFERIOR_ITERATOR_CONTIGUOUS_ITERATOR_HPP_
#define INFERIOR_ITERATOR_CONTIGUOUS_ITERATOR_HPP_
#include <inferior/no_min_max.h>
#include <cstddef>
#include <iterator>
#include <inferior/type_traits.hpp>
namespace inferior {
template<typename Container>
class contiguous_iterator {
@yumetodo
yumetodo / hatena_blog_katex_loader.js
Last active December 14, 2018 11:10
improve message
document.addEventListener("DOMContentLoaded", () => {
"use strict";
Array.from(document.getElementsByClassName("math-render"))
.filter(e => !e.mathRendered)
.forEach(e => {
try {
katex.render(e.textContent, e, {displayMode: true });
} catch (ex) {
e.textContent = ex.message;
}
@yumetodo
yumetodo / pgm_p2_reformater.cpp
Created May 21, 2018 04:57
pgm(P2) image reformatter
#include <iostream>
#include <sstream>
#include <string>
int proc_main(std::istream& is, std::ostream& os)
{
std::string pn;
if(!std::getline(is, pn)) return 1;
if("P2" != pn) return 2;
std::string tmp;
if(!std::getline(is, tmp)) return 3;