View tif2016.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'json' | |
response = open('http://www.idolfes.com/2016/json/timetable/time.json') | |
data = JSON.parse(response.read) | |
artists = {} | |
data.each do |day, stages| | |
stages.each do |stage, items| | |
items.each do |item| |
View server.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from logging.handlers import RotatingFileHandler | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def foo(): | |
app.logger.warning('A warning occurred (%d apples)', 42) |
View .tigrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set main-view = id:width=12 date author commit-title:graph=yes,refs=yes | |
set vertical-split = yes | |
set split-view-height = 80% | |
# 差分の前後の表示行数(diff-context)を指定 | |
set diff-context = 6 | |
set blame-view = date:local author:full id line-number:true,interval=1 text | |
set main-view = line-number:true,interval=10 date:local author:full id commit-title:true,graph=true,refs=true | |
set refs-view = date:local author:full id ref:true commit-title:true | |
set status-view = file-name status:long |
View jsforce_connect.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jsforce from 'jsforce'; | |
var conn = new jsforce.Connection({'loginUrl': 'salesForceURL'}); | |
conn.login('username', 'password+securityToken', function(error, userInfo) { | |
if (error) { | |
return console.log(error); | |
} | |
conn.sobject('Account').find({}).execute(function(error, records) { | |
if (error) { | |
return console.log(error); |
View is.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function is(type, obj) { | |
var clas = Object.prototype.toString.call(obj).slice(8, -1); | |
return obj !== undefined && obj !== null && clas === type; | |
} |
View feedparser.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var FeedParser = require('feedparser'); | |
var request = require('request'); | |
var feed = 'https://news.google.com/news?output=rss&q='; | |
var query = encodeURI('山岳遭難'); | |
var req = request(feed + query); | |
var feedparser = new FeedParser({}); |
View add_news.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var mongoose = require('bluebird').promisifyAll(require('mongoose')); | |
var uriUtil = require('mongodb-uri'); | |
var mongodbUri = process.env.MONGOLAB_URI || 'mongodb://localhost/emt-dev'; | |
var mongooseUri = uriUtil.formatMongoose(mongodbUri); | |
import Company from '../server/api/company/company.model' | |
import News from '../server/api/news/news.model'; | |
import _ from 'lodash'; |
View circle.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine: | |
node: | |
version: v5.1.0 | |
dependencies: | |
pre: | |
- npm install -g bower | |
- npm install | |
- bower install | |
- node_modules/protractor/bin/webdriver-manager update |
View localhost.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
gather_facts: no | |
sudo: no | |
vars: | |
homebrew_taps: | |
- homebrew/binary | |
- homebrew/dupes | |
- caskroom/cask | |
- railwaycat/emacsmacport |
View fizzbuzz.exs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fizzbuzz = fn | |
{true, true} -> 'FizzBuzz' | |
{true, false} -> 'Fizz' | |
{false, true} -> 'Buzz' | |
{false, false} -> nil | |
end | |
1..100 |> Enum.each fn(n) -> | |
case fizzbuzz.({rem(n, 3) == 0, rem(n, 5) == 0}) do | |
nil -> n |