Skip to content

Instantly share code, notes, and snippets.

View 2no's full-sized avatar
🥳

Kazunori Ninomiya 2no

🥳
View GitHub Profile
@Fishrock123
Fishrock123 / gulp.js
Last active August 13, 2025 15:59
gulp & browserify (+watchify +babelify)
var gulp = require('gulp')
var browserify = require('browserify')
var watchify = require('watchify')
var babelify = require('babelify')
var source = require('vinyl-source-stream')
var buffer = require('vinyl-buffer')
var merge = require('utils-merge')
@hissy
hissy / really-simple-csv-importer-addon.php
Created February 25, 2015 14:01
[Really Simple CSV Importer] Example: import image from url to custom field
<?php
/*
Plugin Name: Get Remote Image to Custom Field
*/
add_filter('really_simple_csv_importer_post_saved', function($post)
{
if (is_object($post)) {
// Get the meta data of which key is "image"
$image = $post->image;
@cletusw
cletusw / .eslintrc
Last active October 18, 2025 21:45
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names
@hissy
hissy / gist:0b8df0149fbba16be08d
Last active March 21, 2023 02:15
[Really Simple CSV Importer] 画像をインターネットからダウンロードして投稿に添付し、画像のIDをカスタムフィールドに登録
<?php
/*
Plugin Name: Really Simple CSV Importer Action add-on
Description: Run the additional action after importing the post data
Author: Takuro Hishikawa
Version: 0.1
*/
class rscsvimporter_action {
// singleton instance
@mcasimir
mcasimir / migrate-to-mobile-angular-ui.1.2.md
Last active February 23, 2019 11:38
Migrating to Mobile Angular UI 1.2

Migrating to Mobile Angular UI 1.2

Core UI functionalities

Core UI Functionalities are those any HTML UI built on Angular could use. They are not Mobile-specific nor depending on anything else that Angular itself, and you could use them with any css framework.

YieldTo/ContentFor

They are the same that 1.1 beside to be prefixed with ui- so use: ui-yield-to and ui-content-for.

@rothgar
rothgar / install-tmux
Last active June 28, 2025 05:43 — forked from ekiara/how_to_install_tmux_on_centos
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@indieisaconcept
indieisaconcept / gist:936dbf33cfc844d87968
Last active February 2, 2023 19:58
browserify + watchify + viny-transform + multiple bundles
// this setup assumes you are using gulp-config for file.src & file.dest
// but can be adapted to vanilla easily.
'use strict';
var transform = require('vinyl-transform'),
browserify = require('browserify'),
watchify = require('watchify'),
// consider using gulp-load-plugins
@tanakahisateru
tanakahisateru / shell-command-escape.coffee
Created August 26, 2014 11:15
Shell command escape by CoffeeScript
# replacement of node-shell-quote
# quote ['echo', '"Oh"', '>_<;'] # ==> echo '"Oh"' \>_\<\;
quote = (xs)->
(for s in xs
if /["\s]/.test(s) and !/'/.test(s)
"'" + s.replace(/(['\\])/g, '\\$1') + "'"
else if /["'\s]/.test(s)
'"' + s.replace(/(["\\$`(){}!#&*|])/g, '\\$1') + '"'
else
String(s).replace(/([\\$`(){}!#&*|<>;])/g, '\\$1')
@RobertAudi
RobertAudi / ideavimrc
Created July 28, 2014 08:46
System clipboard support in IdeaVim
nnoremap yy "+yy
vnoremap y "+y
nnoremap p "+p
vnoremap p "+p
nnoremap P "+P
vnoremap P "+P
@gaspanik
gaspanik / gulpfile.js
Last active June 27, 2025 19:30
sample gulpfile.js
// Original: https://github.com/gaspanik/gulpbase/
// Update 0.2.0
var gulp = require('gulp'),
// 列挙するのが面倒なので、load-pluginsでプラグインをロード。何使ってるかは「package.json」で
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*'],
replaceString: /\bgulp[\-.]/