Skip to content

Instantly share code, notes, and snippets.

View K-atc's full-sized avatar
:octocat:
Octocatic Days

K_atc K-atc

:octocat:
Octocatic Days
View GitHub Profile
@bosmacs
bosmacs / latex.template
Created June 28, 2011 19:39 — forked from michaelt/latex.template
Simple Pandoc latex.template with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import sys
# RSA Decipher for SECCON CTF 4(Yokohama)
# Author: Matsukuma Hiroki a.k.a. hhc0null <hhc.0.null@gmail.com>
# Usage: ./RSA_Decipher < [Crypted Text]
@yvt
yvt / gist:8420170
Created January 14, 2014 15:32
4n桁の2進数を逆順にして16進数にするCプログラム
#include <stdio.h>
#define DIGIT(a) ((a)=='1'?1:0)
void rec(){
int c = getchar();
int c2 = getchar(), c3 = getchar(), c4 = getchar();
if(c < 0) return;
rec();
putchar("0123456789abcdef"[((DIGIT(c4)*2+DIGIT(c3))*2+DIGIT(c2))*2+DIGIT(c)]);
}
void main(){
@yvt
yvt / asm-red-black-tree.s
Created February 5, 2014 15:25
x86_64 System V呼び出し規約 AT/T記法のアセンブラで赤黒木 (削除は実装していない, 処理速度やコードサイズは未考慮)
#
# x86_64 赤黒木 (System V 呼び出し規約)
# (C) 2013 @YVT, all rights reserved.
#
.global _RedBlack_AllocNode
# .global _RedBlack_FreeNode
# struct TreeDescriptor {
@yvt
yvt / Spline.h
Created June 22, 2014 11:07
Spline interpolation routines for C++
//
// YSpline (MIT license) by yvt <i@yvt.jp>
//
// -------------
// Quaternion spline interpolation is based on http://qspline.sourceforge.net/qspline.pdf
// -------------
//
#include <functional>
#include <valarray>
import Data.List
prefixMatch [] _ = True
prefixMatch _ [] = False
prefixMatch (needleHead : needleTail) (strHead : strTail) =
if needleHead == strHead then prefixMatch needleTail strTail
else False
findString needle str =
@gaspanik
gaspanik / gulpfile.js
Last active July 10, 2021 13:37
sample gulpfile.js
// Original: https://github.com/gaspanik/gulpbase/
// Update 0.2.0
var gulp = require('gulp'),
// 列挙するのが面倒なので、load-pluginsでプラグインをロード。何使ってるかは「package.json」で
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*'],
replaceString: /\bgulp[\-.]/
anonymous
anonymous / Curved-Cut.markdown
Created February 6, 2015 05:53
Curved Cut
@hashrock
hashrock / vuejs.md
Last active October 5, 2023 23:42
Vue.js資料まとめ(古いので注意)

#まず見るべき

以下のURLは、常に更新されているコンテンツです。

var A = (function(seq) {
function YClass() {}
YClass.prototype.toString = function() { return ((++seq) & 3) == 2 ? -1 : 2; };
return new YClass();
})(0),
B = A;
if (B/A !== A/B && A === B && 1/A > 2/B) console.log('congrats!');