This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <quickjs.h> | |
std::string readTextFile(const std::string& path) | |
{ | |
std::ifstream ifs(path); | |
return std::string(std::istreambuf_iterator<char>(ifs), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::string getDocumentFolder() | |
{ | |
NSArray* paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES); | |
if ([paths count] == 0) | |
{ | |
// Error. | |
return std::string(""); | |
} | |
NSString* applicationSupportDirectory = [NSString stringWithFormat:@"%@/%@", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 自前で球を生成する | |
// | |
// 分割数と半径の定義 | |
int div = 30; | |
float radius = 250; | |
// 頂点配列 | |
PVector[] vtx; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Siv3Dで3D | |
// | |
# include <Siv3D.hpp> | |
// ベクトル&行列ライブラリ | |
// SOURCE https://glm.g-truc.net/0.9.8/index.html | |
# include "glm/glm.hpp" | |
# include "glm/gtc/matrix_transform.hpp" | |
# include "glm/gtx/transform.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Siv3Dで3D | |
// | |
# include <Siv3D.hpp> | |
// ベクトル&行列ライブラリ | |
// SOURCE https://glm.g-truc.net/0.9.8/index.html | |
# include "glm/glm.hpp" | |
# include "glm/gtc/matrix_transform.hpp" | |
# include "glm/gtx/transform.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; sclang.el --- SuperCollider handling | |
(defvar sclang-buffer | |
"*sclang*" | |
"*The name of the sclang process buffer.") | |
(defvar sclang-command | |
"/Applications/SuperCollider.app/Contents/MacOS/sclang" | |
"*The SuperCollider server command.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; disable-mouse を有効にした上で、以下のコードを実行する | |
(define-key evil-motion-state-map (kbd "<down-mouse-1>") nil) | |
(remove-hook 'helm-cleanup-hook #'spacemacs//unprevent-minibuffer-escape) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; disable-mouse を有効にした上で、以下のコードを実行する | |
(define-key evil-motion-state-map (kbd "<down-mouse-1>") nil) | |
(remove-hook 'helm-cleanup-hook #'spacemacs//unprevent-minibuffer-escape) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-mode-line-bom-info () | |
"if with-signature text -> output (B)" | |
(let ((bc (format "%s" buffer-file-coding-system))) | |
(concat (and (string-match "with-signature" bc) "(B)")))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(spaceline-define-segment buffer-encoding-abbrev | |
"The line ending convention used in the buffer." | |
(let ((buf-coding (format "%s" buffer-file-coding-system))) | |
(list (replace-regexp-in-string "-with-signature\\|-unix\\|-dos\\|-mac" "" buf-coding) | |
(concat (and (string-match "with-signature" buf-coding) "ⓑ") | |
(and (string-match "unix" buf-coding) "ⓤ") | |
(and (string-match "dos" buf-coding) "ⓓ") | |
(and (string-match "mac" buf-coding) "ⓜ") | |
))) | |
:separator " ") |
NewerOlder