Skip to content

Instantly share code, notes, and snippets.

@DeaR
DeaR / abbreviations.lua
Last active December 11, 2015 17:08
Abbreviations for NYAOS 3.x
-- Abbreviations for NYAOS 3.x
--
-- Maintainer: DeaR <nayuri@kuonn.mydns.jp>
-- Last Change: 13-Aug-2013.
-- License: MIT License {{{
-- Copyright (c) 2013 DeaR <nayuri@kuonn.mydns.jp>
--
-- 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
@DeaR
DeaR / complete_by.lua
Last active December 11, 2015 19:18
Complete by command for NYAOS 3.x
-- Complete by command for NYAOS 3.x
--
-- Maintainer: DeaR <nayuri@kuonn.mydns.jp>
-- Last Change: 13-Aug-2013.
-- License: MIT License {{{
-- Copyright (c) 2013 DeaR <nayuri@kuonn.mydns.jp>
-- Copyright (c) 2011 azu_re
-- Copyright (c) 2010 wantora
--
-- Permission is hereby granted, free of charge, to any person obtaining a
@DeaR
DeaR / unix_env_expand.lua
Last active December 11, 2015 21:38
Force expand of Unix style environment variable for NYAOS 3.x
-- Force expand of Unix style environment variable for NYAOS 3.x
--
-- Maintainer: DeaR <nayuri@kuonn.mydns.jp>
-- Last Change: 14-Aug-2013.
-- License: MIT License {{{
-- Copyright (c) 2013 DeaR <nayuri@kuonn.mydns.jp>
--
-- 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
@DeaR
DeaR / Shaberu.lisp
Created February 6, 2013 11:05
このxyzzy…しゃべるぞ!
; Shaberu.l
; 元ネタ: http://blog.supermomonga.com/articles/vim/shaberu-vim.html
; 棒読みちゃんを起動しておいてください
; http://chi.usamimi.info/Program/Application/BouyomiChan/
(defconstant *shaberu-addr* "127.0.0.1")
(defconstant *shaberu-port* 50001)
(defun shaberu-say (str)
(with-open-stream (stream (connect *shaberu-addr* *shaberu-port*))
@DeaR
DeaR / reparse_point.patch
Last active December 14, 2015 05:39
NYAOSの内蔵lsでリパースポイントを展開してみた(適当)
diff -r c95acae76050 lsf.cpp
--- a/lsf.cpp Sun Feb 24 15:47:59 2013 +0900
+++ b/lsf.cpp Tue Feb 26 19:34:27 2013 +0900
@@ -10,6 +10,8 @@
# include "ntcons.h"
# include <windows.h>
# include <wincon.h>
+# include <locale.h>
+# include <ddk/ntifs.h>
#endif
@DeaR
DeaR / shebang.lua
Last active December 14, 2015 06:59
shebang for NYAOS 3.x
-- Shebang for NYAOS 3.x
--
-- Maintainer: DeaR <nayuri@kuonn.mydns.jp>
-- Last Change: 13-Aug-2013.
-- License: MIT License {{{
-- Copyright (c) 2013 DeaR <nayuri@kuonn.mydns.jp>
-- Copyright (c) 2010 wantora
--
-- Permission is hereby granted, free of charge, to any person obtaining a
-- copy of this software and associated documentation files (the
@DeaR
DeaR / nyaos_sudo.lua
Last active December 14, 2015 15:09
NYAOSでUACを何とかしてみた
if nyaos.create_object then
local major, minor, build = nyaos.eval(os.getenv('COMSPEC') .. ' /c ver'):match('(%d+).(%d+).(%d+)')
if tonumber(major) >= 6 then
function nyaos.command.sudo(...)
local t = os.tmpname()
t = os.getenv('TEMP') .. '/' .. table.concat({string.byte(t, 1, t:len())})
nyaos.create_object('Shell.Application'):ShellExecute(nyaos.argv[0], '-e \034' .. table.concat({...}, ' ') .. ' > ' .. t .. ' ; echo \\nyaos_sudo_end\\ >> ' .. t .. '\034', nyaos.eval('pwd'), 'runas', 0)
local e
while e ~= '\\nyaos_sudo_end\\' do
f = io.open(t, 'r')
diff -r c61da758a9a2 src/screen.c
--- a/src/screen.c Wed Apr 24 18:34:45 2013 +0200
+++ b/src/screen.c Fri May 03 16:46:51 2013 +0900
@@ -2844,7 +2844,7 @@
int syntax_flags = 0;
int syntax_seqnr = 0;
int prev_syntax_id = 0;
- int conceal_attr = hl_attr(HLF_CONCEAL);
+ int conceal_attr = 0;
int is_concealing = FALSE;
@DeaR
DeaR / neobundle_git_gc.vim
Last active December 16, 2015 20:49
NeoBundleをたまには git gc したかった
function! s:neobundle_git_gc(names)
let names = split(a:names)
let bundles = empty(names) ?
\ neobundle#config#get_neobundles() :
\ neobundle#config#search(names)
let cwd = getcwd()
try
for bundle in bundles
if bundle.type != 'git'
@DeaR
DeaR / maplist.vim
Last active December 17, 2015 05:38
Sorted, Collected, Fix to <M-...>.
" Sorted, Collected, Fix to <M-...>.
"
" Maintainer: DeaR <nayuri@kuonn.mydns.jp>
" Last Change: 13-Aug-2013.
" License: MIT License {{{
" Copyright (c) 2013 DeaR <nayuri@kuonn.mydns.jp>
"
" 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