Skip to content

Instantly share code, notes, and snippets.

@suzusime
suzusime / hanyu_hanko.rb
Last active August 3, 2016 07:38
はんこbot
# -*- mode:ruby; coding:utf-8 -*-
require 'slack'
require 'httpclient'
require 'gyazo'
channelid = ENV['SLACK_CHANNELID']
Slack.configure {|config| config.token = ENV['SLACK_TOKEN'] }
slack = Slack.realtime
gyazo = Gyazo::Client.new ENV['GYAZO_TOKEN']
@suzusime
suzusime / template.cpp
Last active October 21, 2016 16:01
bj2_template
//C++11
#include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>
#include <string>
#include <tuple>
#include <functional>
//備忘:問題によってacc函数の定義とmain函数内を書き換えれば良い、はず
@suzusime
suzusime / FontTool.cs
Created October 31, 2016 18:00
using SharpFont with Monogame
#region MIT License
/*Copyright (c) 2016 Robert Rouhani <robert.rouhani@gmail.com>
SharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
@suzusime
suzusime / fourier.tex
Created February 9, 2017 07:44
gochiusa_tex_template
% 文字コードは UTF-8
\documentclass[a4paper,xelatex,ja=standard, enablejfam=true]{bxjsarticle}% ドライバ指定は無し
%%%フォント関連ここから--------------------
\XeTeXgenerateactualtext=1
\usepackage{zxjatype}
%\setjamainfont{Yu Mincho Regular}
%仮名のブロックを定義しておく。
%定義した後は一度キャンセルしておく(そうしないとかなを別フォントに指定しないフォントの定義が面倒になる)
@suzusime
suzusime / RunMe.py
Last active December 11, 2017 21:04
SECCON 2017 Online CTF - RunMe
import sys
n1=0
n2=1
for i in range(11011-1):
tmp=n1+n2
n1=n2
n2=tmp
print("SECCON{" + str(n2)[:32] + "}")
@suzusime
suzusime / SHA1isDead.py
Created December 11, 2017 21:04
SECCON 2017 Online CTF - SHA-1 is dead
import struct
#print('h'*(4035*512))
src = open("shattered-1.pdf", "rb").read()
l = 4035*512 - len(src)
src = src + b'h'*l
dst = open("made1", "wb").write(src)
src2 = open("shattered-2.pdf", "rb").read(4035*512)
l2 = 4035*512 - len(src2)
src2 = src2 + b'h'*l2
@suzusime
suzusime / vigenere3d.py
Created December 11, 2017 21:17
SECCON 2017 Online CTF - Vigenere3d
s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz_{}"
#鍵を無理やり求めるやつ
def sa(s1,s2):
c = []
for i in range(7):
i1 = s.find(s1[i])
i2 = s.find(s2[i])
c.append(i1-i2)
return c
if exists('b:did_ftplugin_tex_flag')
finish
endif
let b:did_ftplugin_tex_flag = 1
scriptencoding utf-8
" 数式用のキーマップに設定する函数
:function! s:SetKeyMap()
:ino <buffer> B@ B
:ino <buffer> B<Space> B<Space>
@suzusime
suzusime / index.html
Created October 5, 2018 09:22
sample_vue
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
{{ message }}
</div>
<div id="app-2">
@suzusime
suzusime / vue-sample.html
Created October 14, 2018 18:25
vue.jsのてすと
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
{{ message }}
</div>
<div id="app-2">