フロントエンドを楽にするために
Qiitaを支えたい技術 at 時雨祭
- HN: mizchi
- Qiitaの方からきました(入社半年たったらしい)
- Reactオジサンはそろそろ飽きてきた
- Angularに興味が無いのでこっちにきた
// SPRITE | |
//----------------------------------------------------------------------------- | |
// 変数のグローバル汚染が複数あり | |
// list の場合、可読性が低い(コメントが無いと、どの値が何に該当するかわからない) | |
// 並び順を変えると他に影響を及ぼす | |
$btn-type1: 49px, 49px, -4px, -4px, "type1"; | |
$btn-type2: 49px, 49px, -61px, -4px, "type2"; | |
$btn-type3: 49px, 49px, -4px, -61px, "type3"; | |
//$btn-type4: 49px, 49px, -4px, -61px, "type4"; |
fs = require('fs') | |
readline = require('readline') | |
google = require('googleapis') | |
googleAuth = require('google-auth-library') | |
calendar = google.calendar('v3') | |
SCOPES = [ 'https://www.googleapis.com/auth/calendar.readonly' ] | |
TOKEN_DIR = (process.env.HOME or process.env.HOMEPATH or process.env.USERPROFILE) + '/.credentials/' | |
TOKEN_PATH = TOKEN_DIR + 'calendar-api-quickstart.json' | |
# Create an OAuth2 client with the given credentials, and then execute the |
# Description: | |
# DOCOMOの雑談APIを利用した雑談 | |
# | |
# Author: | |
# FromAtom | |
getTimeDiffAsMinutes = (old_msec) -> | |
now = new Date() | |
old = new Date(old_msec) | |
diff_msec = now.getTime() - old.getTime() |
2014/6/23 元記事: https://slack.zendesk.com/hc/en-us/articles/202518103-Restricted-Accounts-and-Single-Channel-Guest-FAQ
制限アカウントとシングルチャンネルゲスト FAQ Restricted Accounts and Single-Channel Guest FAQ
# This is a snippet to add to middleman's config.ru file if you want to add basic auth to your middleman app on heroku | |
# NOTE: you need to stick this above the build script like shown below | |
use Rack::Auth::Basic, "Restricted Area" do |username, password| | |
[username, password] == ['username', 'password'] | |
end | |
# This part below is just what builds the static site. you only need to add lines 4 - 6 above any build command like shown below. | |
use Rack::TryStatic, :root => "build", :urls => %w[/], :try => ['.html', 'index.html', '/index.html'] |
$tmp: ""; | |
.sample1:after{ | |
$tmp: sprintf("%02d,%02d", 1, 2); | |
content: "#{$tmp}"; | |
} | |
// 結果:content: "01,02"; | |
$tmp: ""; | |
.sample1:after{ | |
$tmp: sprintf("%.5s", foobar); |
$tmp: ""; | |
.sample:after { | |
$tmp: str-replace("/_./", "|x|x.upcase.sub!('_', '')", "test_hoge"); | |
content: "#{$tmp}"; | |
} | |
// 結果:content: "testHoge"; | |
$tmp: ""; | |
.sample2:after{ | |
$tmp: str-replace("_", "", "test_hoge"); |
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 "cd " & theWin & ";grunt" | |
end tell | |
end tell | |
end tell |
'use strict'; | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
encoding: { | |
standardSetting: { | |
toEncoding: 'SJIS' | |
, files: { | |
'dest/result.txt': 'src/original.txt' | |
, 'dest/concat.txt': ['src/concat/*.txt'] |