Skip to content

Instantly share code, notes, and snippets.

View mimura1133's full-sized avatar

Satoshi Mimura mimura1133

View GitHub Profile
@mimura1133
mimura1133 / zshrc
Created September 24, 2014 10:05
zshrc
# License : MIT
# http://mollifier.mit-license.org/
########################################
# If not running interactively, don't do anything.
[ -z "$PS1" ] && return
# 環境変数
export LANG=ja_JP.UTF-8
set nocompatible
if &term == 'win32'
set termencoding=cp932
set encoding=cp932
endif
set fileencodings=utf-8,cp932
set smartindent
@mimura1133
mimura1133 / gist:1342542
Created November 6, 2011 06:06
三平方の定理 for Mac
#include <mach/mach.h>
#include <stdio.h>
/************************************************
とりあえず、中のデータは16進で記録してあって、
リトルエンディアンですから、
0x01020304 は、メモリ上に 0x04,0x03,0x02,0x01 の順で格納されます。
要は逆順です。
@mimura1133
mimura1133 / gist:1395485
Created November 26, 2011 11:25
Twitter OAuth 1.0 Sample
using System;
using System.Diagnostics;
using System.IO;
using System.Net;
using System.Security.Cryptography;
using System.Text;
using System.Web;
/*
* この辺を参考に:
@mimura1133
mimura1133 / QRPuzzle_Solve.hsp
Created December 6, 2015 06:29
QRPuzzle のソルバーです (HSP 3.x)
origdic="seccon|accept|achieve|acquire|add|advance|affect|agree|allow|appear|apply|approach|argue|assume|avoid|bear|beat|belong|bite|care|catch|claim|communicate|compare|consider|consume|contact|contain|continue|cost|count|cover|create|cross|decline|define|depend|describe|destroy|determine|develop|die|disappear|discover|draw|earn|encourage|enter|establish|excite|exist|expect|explain|express|face|fail|fear|feed|fire|fit|flow|follow|gain|gather|get|guess|hit|hold|hunt|hurt|imagine|improve|include|increase|indicate|influence|insist|introduce|invent|involve|lay|lead|lie|lose|maintain|manage|manufacture|marry|mean|mention|miss|observe|offer|perform|please|prefer|prepare|press|prevent|produce|program|protect|prove|provide|publish|raise|reach|realize|receive|recognize|reduce|refer|reflect|refuse|regard|remain|remember|reply|represent|require|reveal|rise|risk|rule|satisfy|save|search|seat|seek|seem|serve|share|solve|sound|spend|spread|stay|steal|stick|strike|struggle|suffer|suggest|support|suppose|surprise|survive|te
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
comment_char %
escape_char /
% This file is part of the GNU C Library and contains locale data.
% The Free Software Foundation does not claim any copyright interest
% in the locale data contained in this file. The foregoing does not
% affect the license of the GNU C Library as a whole. It does not
% exempt you from the conditions of the license if your use would
% otherwise be governed by that license.
{
"defaultProfile": "{5b351a96-8fb8-49d7-b960-4bb0d1aee3c5}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"profiles": [
{
"guid": "{5b351a96-8fb8-49d7-b960-4bb0d1aee3c5}",
@mimura1133
mimura1133 / conrainers.cs
Created May 26, 2019 09:20
containers challenge's builder code.
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
namespace build
{
@mimura1133
mimura1133 / dlna_proxy.py
Created May 16, 2021 20:01
dlna_proxy.py
#!/bin/python3
#
# SSDP (DLNA の探索プロトコル) を吸って吐くプロキシ。
# Wireguard のように純粋にbridgeできないネットワーク間で使うと幸せになれる気がします。
# (使ったことでネットワークがダウン等しても保証は出来ませんので、自己責任でどうぞ。)
#
# Author : Satoshi Mimura (@mimura1133)
#