Skip to content

Instantly share code, notes, and snippets.

@Milly
Milly / init.cmd
Created November 11, 2019 06:25
Inject clink to cmd.exe, if it is interactive running.
@setlocal enableextensions disabledelayedexpansion
@echo off
if not x%CMDNOINIT% == x goto :done
call :check_interactive "%CMDCMDLINE:"=""%"
if ERRORLEVEL 2 goto :interactive_silent
if ERRORLEVEL 1 goto :interactive
goto :done
@Milly
Milly / wsl-open
Created October 16, 2019 08:21
Open a file or directory by the default application from command in the wsl, Like xdg-open.
#!/bin/bash -eu
target=${1:-.}
cmd=
if [[ -d $target ]]; then
# open directory
cmd=explorer.exe
fi
if [[ -e $target ]]; then
@Milly
Milly / # cmigemo - 2019-04-16_10-43-26.txt
Created April 16, 2019 03:32
cmigemo on Ubuntu 18.04.2 LTS - Homebrew build logs
Homebrew build logs for cmigemo on Ubuntu 18.04.2 LTS
Build date: 2019-04-16 10:43:26
@Milly
Milly / .gitattribute
Last active September 2, 2018 17:44
To clean `*.ipynb` files before git-commit.
*.ipynb filter=clean-ipynb
@Milly
Milly / TwitterGalleryImprove.user.css
Last active February 3, 2016 07:39
Twitter Gallery maximize and image right-clickable.
@-moz-document domain("twitter.com") {
.GalleryNav--prev,
.GalleryNav--next {
width: 30% !important;
}
.Gallery-content,
.media-image {
width: auto !important;
height: auto !important;
}
@Milly
Milly / fix-unix_fullname.patch
Last active November 13, 2015 08:57
Fixed Vim `mch_FullName` in os_unix.c
diff --git a/src/Makefile b/src/Makefile
index 90b2f0c..3139102 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1926,6 +1926,7 @@ test1 \
test_options \
test_perl \
test_qf_title \
+ test_resolve_swap \
test_ruby \
diff --git a/src/os_unix.c b/src/os_unix.c
index 8f059be..f7f4115 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -2498,6 +2498,14 @@ mch_FullName(fname, buf, len, force)
# else
cygwin_conv_to_posix_path(fname, posix_fname);
# endif
+ if (STRCMP(fname, posix_fname) != 0)
+ {
@Milly
Milly / 01_test_path_cygwin.c
Created November 11, 2015 06:28
Cygwin path conversion API test.
/*
* Cygwin path conversion API test.
*/
#include <sys/cygwin.h>
#include <stdio.h>
#include <stdlib.h>
#ifndef MAX_PATH
# ifdef PATH_MAX
@Milly
Milly / README.md
Last active September 2, 2018 13:03
Twipla printlist enhance. for Greasemonky user script
// ==UserScript==
// @name Clean Google links
// @namespace http://d.hatena.ne.jp/MillyC/
// @description clean links in Google search result page (remove "onmousedown" attribute).
// @include http://www.google.com/search?*
// @include https://www.google.com/search?*
// @include http://www.google.co.*/search?*
// @include https://www.google.co.*/search?*
// @grant none
// ==/UserScript==