Skip to content

Instantly share code, notes, and snippets.

View qrg's full-sized avatar
🏠
Working from home

Qurage qrg

🏠
Working from home
View GitHub Profile
var css = '@keyframes pound {50% { transform: scale(1.4); }} .thechosenone {background-image: url("http://i.gyazo.com/8e5ca2b4889a1094fa1e71aa977eb4fe.png"); background-size:cover; animation: pound .25s ease}',
iframe = document.querySelector('iframe'),
head = iframe.contentDocument.head,
style = iframe.contentDocument.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
'use strict';
// http://jxck.hatenablog.com/entry/2014-01-12/generator-screencaset
const co = (gen) => {
const g = gen();
const done = (err, data) => {
if (err) {
return g.throw(err);
#!/usr/bin/env node
'use strict';
import 'babel-polyfill';
import fs from 'fs';
const PREFIX = './sample/';
const read = (file) => {
@qrg
qrg / .css
Created March 5, 2016 15:46
chrome quick tabs custm style
body {
width: 600px;
font-family: inherit;
}
div.title {
color: #444;
}
div.url {
@qrg
qrg / check-gulp-blacklist.js
Created March 16, 2016 06:16
`$ node ~/scripts/check-gulp-blacklist.js [SEARCHWORD]`
#!/usr/bin/env node
'use strict';
const https = require('https');
const argv = process.argv[2];
const uri = 'https://raw.githubusercontent.com/gulpjs/plugins/master/src/blackList.json';
const isEmpty = (obj) => {
return Object.keys(obj).length === 0 && JSON.stringify(obj) === JSON.stringify({})
#!/usr/bin/env node
'use strict';
const npmCount = require('npm-count');
const today = new Date().toISOString().replace(/T.+$/g, '');
const RANK = 50;
const padLeft = (str, width, z) => {
@qrg
qrg / .js
Created March 24, 2016 11:25
'use strict';
const through = require('through2');
const yaml = require('js-yaml');
const ejs = require('ejs');
const gutil = require('gulp-util');
module.exports = (template) => {
return through.obj(function (file, enc, cb) {
@qrg
qrg / _try-to-build-react-via-rollup.js
Last active May 30, 2016 20:21
sourcemaps does not work
import {rollup} from 'rollup';
import nodeResolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from 'rollup-plugin-replace';
import jsx from 'rollup-plugin-jsx';
import babel from 'rollup-plugin-babel';
import {js, server} from '../config';
export default function () {
@qrg
qrg / env.sh
Last active June 21, 2016 14:32
setup ndenv
# ndenv
if [ -s ${HOME}/.ndenv/bin ]; then
export PATH="$HOME/.ndenv/bin:$PATH"
eval "$(ndenv init -)"
fi
#!/bin/bash -v
UNIX_NAME=`uname`
ARCH=`arch -arm64 uname -m`
BREW_PREFIX=''
if [ "${UNIX_NAME}" = 'Darwin' -a "${ARCH}" = 'arm64' ]; then
BREW_PREFIX='arch -arm64'
fi