Skip to content

Instantly share code, notes, and snippets.

View 2no's full-sized avatar
🤗

Kazunori Ninomiya 2no

🤗
View GitHub Profile
@2no
2no / dogrunt.applescript
Created February 6, 2014 12:39
https://gist.github.com/wakuworks/5500063 を改良。ローカルファイルに grunt がなければ `npm install` を実行。さらにその後 `grunt` コマンド実行する
tell application "Finder"
set myWin to window 1
set theWin to (quoted form of POSIX path of (target of myWin as alias))
tell application "Terminal"
activate
tell window 1
do script "/bin/sh -c 'cd " & theWin & "; npm list grunt | grep empty >/dev/null 2>&1 && npm install; grunt'"
end tell
end tell
end tell
@2no
2no / .minttyrc-hybrid
Last active August 29, 2015 14:01
Hybrid color settings for the Cygwin mintty terminal. $ cat .minttyrc-hybrid >> ~/.minttyrc
BackgroundColour=29,31,33
ForegroundColour=197,200,198
BoldBlack=40,42,46
Black=55,59,65
BoldRed=165,66,66
Red=204,102,102
BoldGreen=140,148,64
Green=181,189,104
BoldYellow=222,147,95
Yellow=240,198,116
@2no
2no / console2-hybrid.xml
Created May 29, 2014 02:04
A dark colour scheme for Console2
<?xml version="1.0"?>
<settings>
<console>
<colors>
<color id="0" r="40" g="42" b="32"/>
<color id="1" r="165" g="66" b="66"/>
<color id="2" r="140" g="148" b="64"/>
<color id="3" r="222" g="147" b="95"/>
<color id="4" r="95" g="129" b="157"/>
<color id="5" r="133" g="103" b="143"/>
@2no
2no / battery.cpp
Created May 30, 2014 09:37
Cygwin, gcc-g++ $ make battery
#include <iostream>
#include <windows.h>
int main(int argc, char *argv[])
{
SYSTEM_POWER_STATUS powerStatus;
int percent = 0;
if (GetSystemPowerStatus(&powerStatus) == TRUE) {
percent = (int)powerStatus.BatteryLifePercent;
set ignorecase
set smartcase
set hlsearch
inoremap <C-]> <Esc>
@2no
2no / Vagrantfile
Created October 18, 2014 09:52
Vagrant + Docker + dockerfile/nodejs-bower-grunt でフロントの開発環境を整える。
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] = "docker"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.synced_folder ".", "/vagrant", disabled: true
@2no
2no / gist:720ba7ab5cb6c36c40a4
Created November 21, 2014 09:39
WordPress 4.0.1 と 4.0.0 の差分
diff -qr wordpress-4.0.1 wordpress-4.0.0
Files wordpress-4.0.1/readme.html and wordpress-4.0.0/readme.html differ
Files wordpress-4.0.1/wp-admin/about.php and wordpress-4.0.0/wp-admin/about.php differ
Files wordpress-4.0.1/wp-admin/includes/class-wp-plugin-install-list-table.php and wordpress-4.0.0/wp-admin/includes/class-wp-plugin-install-list-table.php differ
Files wordpress-4.0.1/wp-admin/includes/image.php and wordpress-4.0.0/wp-admin/includes/image.php differ
Files wordpress-4.0.1/wp-admin/includes/plugin-install.php and wordpress-4.0.0/wp-admin/includes/plugin-install.php differ
Files wordpress-4.0.1/wp-admin/includes/post.php and wordpress-4.0.0/wp-admin/includes/post.php differ
Files wordpress-4.0.1/wp-admin/js/editor-expand.js and wordpress-4.0.0/wp-admin/js/editor-expand.js differ
Files wordpress-4.0.1/wp-admin/js/editor-expand.min.js and wordpress-4.0.0/wp-admin/js/editor-expand.min.js differ
Files wordpress-4.0.1/wp-admin/js/media.js and wordpress-4.0.0/wp-admin/js/media.js differ
@2no
2no / private.xml
Created March 16, 2015 02:13
Karabiner
<?xml version="1.0"?>
<root>
<item>
<name>ESC to IME off (to English) + Esc + Esc</name>
<appendix>Enable for all but HHK</appendix>
<identifier>private.vim.ime_off_ESC</identifier>
<only>TERMINAL, VI</only>
<inputsource_only>JAPANESE</inputsource_only>
<autogen>
__KeyToKey__ KeyCode::ESCAPE, ModifierFlag::NONE,
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@2no
2no / .csscomb.json
Last active August 29, 2015 14:27
プロパティの順序は Recess に準拠
{
"exclude": [
".git/**",
"node_modules/**",
"bower_components/**"
],
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",