Skip to content

Instantly share code, notes, and snippets.

@shibainurou
shibainurou / CircleQueue.cpp
Last active December 10, 2015 01:38
循環キュークラス
#include <iostream>
#include <conio.h>
using namespace std;
class CCircleQueue
{
private:
const static int MAX = 4;
int value[MAX];
int headIndex;
@shibainurou
shibainurou / init.el
Last active October 21, 2020 01:52
emacsの設定ファイル
;; 配下のフォルダ全読み込み
(setq load-path(cons "~/.emacs.d/elisp" load-path))
(setq inhibit-startup-message t)
(let ((dir (expand-file-name "~/.emacs.d/elisp")))
(if (member dir load-path) nil
(setq load-path (cons dir load-path))
(let ((default-directory dir))
(load (expand-file-name "subdirs.el") t t t))))
(require 'package)
@shibainurou
shibainurou / StringEscapePaste.py
Created March 14, 2013 12:45
String s = の行でペーストするとダブルクォーテーションをエスケープするプラグイン ref: http://qiita.com/items/68f966fe07540a6568d6
class StringEscapePasteCommand(sublime_plugin.TextCommand):
def run(self, edit):
line_str = self.view.substr(self.view.line(self.view.sel()[0]))
match = re.search('\".*\"', line_str)
if match:
sel_rowcol = self.view.rowcol(self.view.sel()[0].begin())
if match.start() < sel_rowcol[1] and sel_rowcol[1] < match.end():
clipboard = sublime.get_clipboard()
self.view.insert(edit, self.view.sel()[0].begin(), clipboard.replace('\"', '\\\"'))
else:
@shibainurou
shibainurou / file0.txt
Created August 8, 2013 14:18
オートシェイプとオートシェイプの間の隙間を消す ref: http://qiita.com/shibainurou/items/19ccc1ebf99b70de0e19
'選択されているオートシェイプをくっつける(横)
Sub SelectionShapesMagnetHorizon()
Dim ShapesInfo() As StShapesInfoH
ReDim ShapesInfo(Selection.ShapeRange.count - 1)
Dim t As Integer
Dim i As Integer
For i = 0 To Selection.ShapeRange.count - 1
ShapesInfo(i).index = i + 1 ' 一意になるデータが無いのでindexを使う
@shibainurou
shibainurou / html_practice.html
Last active May 11, 2022 13:44 — forked from machida/html_practice.html
HTMLの練習(このレシピにマークアップをしてみましょう)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>カレーのレシピ</title>
</head>