Skip to content

Instantly share code, notes, and snippets.

View ponko2's full-sized avatar

Takahito Nakano ponko2

  • Shizuoka, Japan
  • 11:32 (UTC +09:00)
View GitHub Profile
@ponko2
ponko2 / neovim-remote-alias.zsh
Created October 7, 2017 16:24
NeovimのTerminal内でNeovimを起動しようとした時はバッファで開く
if [[ -v MYVIMRC ]] && type nvr &> /dev/null; then
alias nvim='nvr --remote-silent'
fi
@ponko2
ponko2 / atom-csscomb.patch
Created December 31, 2015 19:11
atom-csscombが.csscomb.jsonでおこなった設定の一部を無視する問題への応急処置
diff --git index.js index.js
index 9fc06ec..68e81c4 100644
--- index.js
+++ index.js
@@ -74,10 +74,8 @@ const getCombConfig = () => {
let config;
- if (configureWithJSON()) {
- if (fs.existsSync(configPath)) {
@ponko2
ponko2 / open-vim.patch
Created October 31, 2015 08:38
AtomをSpotlight等から起動するとopen-vimでmvimにPATHが通らない問題への応急処置
diff --git lib/open-vim.coffee lib/open-vim.coffee
index dc44209..bf41ad8 100644
--- lib/open-vim.coffee
+++ lib/open-vim.coffee
@@ -4,6 +4,7 @@ OS = require 'os'
module.exports =
activate: (state) ->
+ process.env.PATH += ":/usr/local/bin"
vimType = if OS.platform() is "darwin" then "mvim" else "gvim"
@ponko2
ponko2 / app.scss
Created October 29, 2015 02:42
Laravel ElixirでBootstrapを使う時の設定
// resources/assets/sass/app.scss
@charset 'UTF-8';
// Bootstrap
@import 'bootstrap/variables';
@import 'node_modules/bootstrap-sass/assets/stylesheets/bootstrap';
// Font Awesome
@import 'font-awesome/variables';
@ponko2
ponko2 / anyframe-widget-interactive-git-rebase
Created June 6, 2015 15:31
anyframe で git rebase -i
git log --oneline --decorate --no-color \
| anyframe-selector-auto \
| awk '{print $1 "^"}' \
| anyframe-action-execute git rebase -i
@ponko2
ponko2 / gist:da4f10e956f3c6de6ac2
Created May 11, 2015 03:26
Atom linter-eslint plugin v0.5.4 + ESLint v0.21.0 でESLint Pluginが読み込まれない問題への応急処置
--- lib/linter-eslint.coffee
+++ lib/linter-eslint.coffee
@@ -71,6 +71,9 @@ class LinterESLint extends Linter
if @localEslint
options.plugins = config.plugins
engine = new CLIEngine(options)
+ config.plugins.forEach (key) ->
+ plugin = require(resolve("eslint-plugin-#{key}", {basedir: path.dirname(origPath)}))
+ engine.addPlugin(key, plugin)
else
@ponko2
ponko2 / default.rb
Created April 10, 2015 11:46
itamaeでdelayedなnotifiesが連鎖したときの実行結果
execute 'task1' do
command 'echo "task1"'
notifies :run, 'execute[task2]', :delayed
end
execute 'task2' do
command 'echo "task2"'
notifies :run, 'execute[task3]', :delayed
action :nothing
end
@ponko2
ponko2 / default.rb
Created April 10, 2015 07:51
itamaeでimmediatelyなnotifiesが連鎖したときの実行結果
execute 'task1' do
command 'echo "task1"'
notifies :run, 'execute[task2]', :immediately
end
execute 'task2' do
command 'echo "task2"'
notifies :run, 'execute[task3]', :immediately
action :nothing
end
@ponko2
ponko2 / ConfigServiceProvider.php
Created January 29, 2015 01:52
localのときだけServiceProviderを追加
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class ConfigServiceProvider extends ServiceProvider
{
/**
* Overwrite any vendor / package configuration.
*
* This service provider is intended to provide a convenient location for you
@ponko2
ponko2 / codeStyleSettings.xml
Created September 18, 2014 07:49
PhpStormのCode Style設定
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectCodeStyleSettingsManager">
<option name="PER_PROJECT_SETTINGS">
<value>
<PHPCodeStyleSettings>
<option name="ALIGN_KEY_VALUE_PAIRS" value="true" />
<option name="ALIGN_PHPDOC_PARAM_NAMES" value="true" />
<option name="ALIGN_PHPDOC_COMMENTS" value="true" />
<option name="ALIGN_ASSIGNMENTS" value="true" />