Skip to content

Instantly share code, notes, and snippets.

View ShingoFukuyama's full-sized avatar

Shingo Fukuyama ShingoFukuyama

  • Japan
View GitHub Profile
<?xml version="1.0"?>
<root>
<item>
<name>Change Return Key R</name>
<item>
<name>Return to Command_R</name>
<identifier>remap.return2commandR</identifier>
<autogen>__KeyToKey__ KeyCode::RETURN, KeyCode::COMMAND_R</autogen>
</item>
<item>
@ShingoFukuyama
ShingoFukuyama / helm-for-only-dir.el
Last active November 9, 2016 01:45
M-x my-helm-for-only-dir
(defun my-helm-for-only-dir ($query)
(interactive "sDir name: ")
(helm :sources
`((name . "helm for directory")
(candidates . (lambda ()
(split-string
(shell-command-to-string
(format "find `pwd -P` -type d | grep '%s'" $query)))))
(action . (lambda ($cand)
(if (file-directory-p $cand)
@ShingoFukuyama
ShingoFukuyama / my-sanctuarize-region.el
Last active November 9, 2016 01:45
You can lock editable area from the region you make. #Emacs
;;; Usage:
;; Make reagion, and then M-x my-sanctuarize-region. You can only edit the region area you made.
;; M-x my-sanctuarize-region-clear to clear the effect
(defvar my-sanctuarize-region-outer)
(defun my-sanctuarize-region ()
(interactive)
(if mark-active
@ShingoFukuyama
ShingoFukuyama / gist:9835808
Last active May 30, 2017 05:27
Execute Emacs Lisp in org file when it's opened.
(setq my-org-init-elisp-beg "# elisp")
(setq my-org-init-elisp-end "# end")
(setq my-org-init-elisp-comment "^#")
(defun my-org-init-elisp ()
(save-excursion
(goto-char (point-min))
(while (re-search-forward my-org-init-elisp-beg nil t)
(let ($beg $end $elisp)
(forward-line 1)
@ShingoFukuyama
ShingoFukuyama / Font-Awesome-for-Emacs.el
Last active May 3, 2020 11:46
Show Font Awesome icons on Emacs
;; Assume you have already installed Font Awesome on the system
;; http://fortawesome.github.io/Font-Awesome/
(require 'ov)
;; Overlay Library
;; https://github.com/ShingoFukuyama/ov.el
;; Example 1: Insert all fonts at the cursor position
(defun font-awesome-insert-all ()
EMACS_VER=24.3
curl -O http://ftp.gnu.org/pub/gnu/emacs/emacs-${EMACS_VER}.tar.gz
curl -O https://gist.githubusercontent.com/anonymous/8553178/raw/c0ddb67b6e92da35a815d3465c633e036df1a105/emacs.memory.leak.aka.distnoted.patch.diff
svn co http://svn.sourceforge.jp/svnroot/macemacsjp/inline_patch/trunk inline_patch
tar xvfz emacs-${EMACS_VER}.tar.gz
cd emacs-${EMACS_VER}
@ShingoFukuyama
ShingoFukuyama / gist:6a02a4cd5b80a4cf3477
Last active May 30, 2017 05:27
emacs font change with overlay
;; require ov.el (ver 1.0.5)
;; https://github.com/ShingoFukuyama/ov.el
(require 'ov)
(defvar my-ov-font-size nil)
(defun my-ov-font-size-change (ratio &optional update-all-buffer)
(let ((ov-sticky-rear t)
(ov-sticky-front t))
//
// UIScrollView+Scrollabitily.h
//
// Created by FukuyamaShingo on 9/4/14.
// Copyright (c) 2014 FukuyamaShingo. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIScrollView (Scrollabitily)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#import "ViewController.h"
#import <WebKit/WebKit.h>
@interface ViewController ()
@property (nonatomic, strong) WKWebView *webView;
@property (nonatomic, strong) UIActivityViewController *activityController;
@end
@implementation ViewController