Skip to content

Instantly share code, notes, and snippets.

View kngwyu's full-sized avatar
🌊
I restrict email notifications, so please mention me if you nedd quick response.

Yuji Kanagawa kngwyu

🌊
I restrict email notifications, so please mention me if you nedd quick response.
View GitHub Profile
%#!lualatex -shell-escape template.tex
% Some description here
\documentclass{ltjsarticle}
% Packages
\usepackage{lltjext}
\usepackage{luatexja}
\usepackage{luatexja-fontspec}
\usepackage{luatexja-ruby}
\usepackage{amsmath}
\usepackage{amssymb}
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "jp"
Option "XkbModel" "jp106"
Option "XkbOptions" "ctrl:swapcaps,alt:leftaltismeta"
EndSection
;;; init.el --- init file if Emacs
;;; Commentary:
;;; Code:
(setq debug-on-error t)
;;; Misc
(setq-default bidi-display-reordering nil)
(setq inhibit-splash-screen t)
(setq history-delete-duplicates t)
#![recursion_limit = "1024"]
extern crate futures;
#[macro_use]
extern crate stdweb;
use stdweb::web::ArrayBuffer;
use stdweb::web::error::Error;
use stdweb::{Promise, PromiseFuture};
use futures::Future;
use stdweb::unstable::TryInto;
use std::str;
#![recursion_limit = "1024"]
extern crate futures;
#[macro_use]
extern crate stdweb;
use stdweb::web::ArrayBuffer;
use stdweb::{Once, Promise, PromiseFuture, Reference};
use futures::Future;
use std::path::Path;
use std::fs::File;
use std::io::prelude::*;
function org-cat
org-ruby $argv > /tmp/org-cat-tmp.html
and firefox /tmp/org-cat-tmp.html
end
[[ $- != *i* ]] && return
export LANG=ja_JP.UTF-8
export PATH=$HOME/.local/bin:$PATH
export PATH=$(ruby -e 'print Gem.user_dir')/bin:$PATH
export PATH=$HOME/.node_modules/bin:$PATH
# Rust config
export PATH=$HOME/.cargo/bin:$PATH
export PATH="$HOME/.poetry/bin:$PATH"
# export PATH=$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin:$PATH
export RUST_SRC_PATH=$(rustc --print sysroot)/lib/rustlib/src/rust/src
diff -up ./a/flycheck.el ./b/flycheck.el
--- ./a/flycheck.el 2017-12-31 13:43:36.229887796 +0900
+++ ./b/flycheck.el 2017-12-31 13:40:02.844965814 +0900
@@ -9375,7 +9375,10 @@ This syntax checker requires Rust 1.15 o
:face (cond
((not need-binary-name) 'success)
((not flycheck-rust-binary-name) '(bold error))
- (t 'success))))))))
+ (t 'success)))))))
+ :working-directory (lambda (_)
;;; rustfmt
(let ((ld-lib-path (ignore-errors (car (process-lines "rustc" "--print" "sysroot")))))
(when (and ld-lib-path (file-directory-p ld-lib-path))
(setenv "LD_LIBRARY_PATH" (expand-file-name "lib" ld-lib-path))))
--- a/src/cpp/core/system/Crypto.cpp.orig 2017-10-14 15:59:52.561983799 +0900
+++ b/src/cpp/core/system/Crypto.cpp 2017-10-14 15:58:24.504542511 +0900
@@ -261,27 +261,26 @@ Error aesEncrypt(const std::vector<unsig
int outlen = 0;
int bytesEncrypted = 0;
- EVP_CIPHER_CTX ctx;
- EVP_CIPHER_CTX_init(&ctx);
- EVP_CipherInit_ex(&ctx, EVP_aes_128_cbc(), NULL, &key[0], &iv[0], kEncrypt);
+ EVP_CIPHER_CTX* ctx = EVP_CIPHER_CTX_new();