Skip to content

Instantly share code, notes, and snippets.

@kurogomapurin
kurogomapurin / init.el
Created April 27, 2015 11:27
Unity C# on Emacs
(autoload 'csharp-mode "csharp-mode" "Major mode for editing C# code." t)
(setq auto-mode-alist
(append '(("\\.cs$" . csharp-mode)) auto-mode-alist))
(defun my-csharp-mode-fn ()
(turn-on-auto-revert-mode)
(setq indent-tabs-mode nil)
)
(add-hook 'csharp-mode-hook 'my-csharp-mode-fn t)
@kurogomapurin
kurogomapurin / init.el
Last active August 29, 2015 14:20
company
(eval-after-load 'company
'(progn
(define-key company-active-map (kbd "\C-n") 'company-select-next)
(define-key company-active-map [control n] 'company-select-next)
(define-key company-active-map (kbd "\C-p") 'company-select-previous)
(define-key company-active-map [control p] 'company-select-previous)
)
)
@kurogomapurin
kurogomapurin / init.el
Created April 27, 2015 04:49
auto-save-buffer-enhanced
(require 'auto-save-buffers-enhanced)
(auto-save-buffers-enhanced t)
(setq auto-save-buffers-enhanced-include-regexps '(".+"))
(setq auto-save-buffers-enhanced-exclude-regexps '("^not-save-file" "\\.ignore$"))
(global-set-key "\C-xas" 'auto-save-buffers-enhanced-toggle-activity)
@kurogomapurin
kurogomapurin / init.el
Last active August 29, 2015 14:19
MELPA
(require 'package) ;;この行は既に書かれていれば要りません
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t);;最初と最後の行の間に追記します
(package-initialize) ;; この行は既に書かれていれば要りません
@kurogomapurin
kurogomapurin / init.el
Last active August 29, 2015 14:19
init.el
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (tango-dark)))
'(ns-command-modifier (quote meta))
'(ns-right-command-modifier (quote meta)))
(custom-set-faces
;; custom-set-faces was added by Custom.
@kurogomapurin
kurogomapurin / gist:5688ce9755235292de6b
Last active August 29, 2015 14:19
Emacs install by homebrew
brew install --japanese --cocoa --with-gnutls -v emacs
require "Cocos2d"
require "Cocos2dConstants"
local MultiTouchLayer = class("MultiTouchLayer",function()
return cc.Layer:create()
end)
function MultiTouchLayer:ctor()
self.visibleSize = cc.Director:getInstance():getVisibleSize()
self.origin = cc.Director:getInstance():getVisibleOrigin()
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="100" height="100" tilewidth="32" tileheight="32">
<tileset firstgid="1" name="test" tilewidth="32" tileheight="32">
<image source="Resources/test.png" width="320" height="320"/>
</tileset>
|||
|||
\|||/
\ /
bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !Layer::init() )
{
return false;
}
Size visibleSize = Director::getInstance()->getVisibleSize();