Skip to content

Instantly share code, notes, and snippets.

View tgfjt's full-sized avatar
🐈

Takashi Fujita tgfjt

🐈
View GitHub Profile
<article>
<section>
<h2>jsDoc?</h2>
<pre class="prettyprint linenums">
<code>
/**
* @type {Object}
*/
var test = {};
@tgfjt
tgfjt / Gruntfile.js
Created November 19, 2013 10:27
merge Config with lodash require personal task
var _ = require('lodash');
/* global module:false */
module.exports = function(grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
grunt.initConfig(_.merge.apply({}, _.values(require('./tasks/def.js'))));
grunt.registerTask('personal', function () {
@tgfjt
tgfjt / index.html
Created January 7, 2014 06:57
try Backbone + Ractive (with Yeoman)
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ractive test</title>
<meta name="description" content="">
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
gulp.task('lint', function() {
gulp.src('./js/*.js')
.pipe(jshint())
.pipe(jshint('./.jshintrc'))
.pipe(jshint.reporter(stylish));
});
@tgfjt
tgfjt / abc.php
Last active January 2, 2016 11:19
A+B=15, A+2B=25, A+B+C=? こういうことをphpでやることはあまりなさそう
<?php
$ns = array_map(function($ns) {
$i = 0;
$sum = 0;
while ($i < count($ns)):
$sum += hexdec($ns[$i]);
$i++;
endwhile;
return dechex($sum);
}, [['A','B'], ['A','2B'], ['A','B','C']]);
@tgfjt
tgfjt / fuga.txt
Created January 9, 2014 01:30
`find ./ -name "*.txt" | xargs sed -i "" 's/ドイツ/日本/g'`
bar
foo
ドイツ人
@tgfjt
tgfjt / Gruntfile.js
Created January 25, 2014 13:06
split grunt tasks
module.exports = function(grunt) {
'use strict';
require('time-grunt')(grunt);
require('jit-grunt')(grunt);
// like a Interface
var configObject = require('./grunt/config');
grunt.initConfig({
@tgfjt
tgfjt / config.js
Last active January 4, 2016 13:28
// config.js in ./grunt
require('fs').readdirSync('./grunt').forEach(function(file) {
if (file !== 'config.js') {
module.exports[file.replace('.js', '')] = require('./' + file);
}
});
@tgfjt
tgfjt / calmdown-vipbox.md
Last active August 29, 2015 13:56
no more add and popup @vipbox

calmdown-vipbox

Chrome WebStore に公開しました


ソチオリンピックも始まり、スノボなんかが見たかったりもする中。

我が家にはテレビがないので、インターネットで見れないかと思いました。 

vipbox という良いメディアを見つけたは良いのですが、広告が常軌を逸して鬱陶しいため、「どうにかして快適に見る方法を」と作ってみました。

@tgfjt
tgfjt / wercker-step-hall-notify.md
Created February 10, 2014 15:55
WerckerのStepを作りました

WerckerのStepを作りました

** Steps **

Steps make up the wercker pipeline and can either be executed in the build or deploy phase within the pipeline.

Hipchat や Idobata、Lingr はもう有ったのですが、 Hall に通知する Step が無かったので、作ってみました。