この記事は NewsPicks Advent Calendar 2018 の3日目の記事です。
NewsPicksで働いている masa_edw です。
入社後一ヶ月経ったばかりで技術的には何か言えるほどのことをまだしておらず、サービスや会社のことについて語るのもおこがましかろうということで、自分語りをします。
| export function tuple<T1, T2>(t1: T1, t2: T2): [T1, T2] { | |
| return [t1, t2]; | |
| } | |
| export type Func<T, R> = (t: T) => R; | |
| export type KeyValuesPair<K, V> = [K, V[]]; | |
| export const groupBy = Symbol(); | |
| export const toMapBy = Symbol(); |
| import cdk = require("@aws-cdk/core"); | |
| import sfn = require("@aws-cdk/aws-stepfunctions"); | |
| import { Duration } from "@aws-cdk/core"; | |
| export class SampleStack extends cdk.Stack { | |
| constructor(app: cdk.App, id: string, props?: cdk.StackProps) { | |
| super(app, id, props); | |
| const task1 = new sfn.Wait(this, "task1", { | |
| time: sfn.WaitTime.duration(Duration.minutes(1)), |
この記事は NewsPicks Advent Calendar 2018 の3日目の記事です。
NewsPicksで働いている masa_edw です。
入社後一ヶ月経ったばかりで技術的には何か言えるほどのことをまだしておらず、サービスや会社のことについて語るのもおこがましかろうということで、自分語りをします。
| // Type definitions for react-redux 5.0.8 | |
| // Project: https://github.com/rackt/react-redux | |
| // Definitions by: Qubo <https://github.com/tkqubo>, | |
| // Thomas Hasner <https://github.com/thasner>, | |
| // Kenzie Togami <https://github.com/kenzierocks>, | |
| // Curits Layne <https://github.com/clayne11> | |
| // Frank Tan <https://github.com/tansongyang> | |
| // Nicholas Boll <https://github.com/nicholasboll> | |
| // Dibyo Majumdar <https://github.com/mdibyo> | |
| // Prashant Deva <https://github.com/pdeva> |
| // TestDbAsyncQueryProvider from https://msdn.microsoft.com/en-us/library/dn314429(v=vs.113).aspx | |
| internal class TestDbAsyncQueryProvider<TEntity> : IDbAsyncQueryProvider | |
| { | |
| private readonly IQueryProvider _inner; | |
| internal TestDbAsyncQueryProvider(IQueryProvider inner) | |
| { | |
| _inner = inner; | |
| } |
| #!/bin/bash | |
| name=$1 | |
| dir=$(basename $name .jpg) | |
| if [[ ! -d $dir ]]; then | |
| mkdir $dir | |
| fi | |
| for i in 1040 1024 700 460 300 240; do |
| module Isono | |
| class Namihe | |
| end | |
| end | |
| class Isono::Wakame | |
| Namihe #=> NameError: uninitialized constant Isono::Wakame::Namihe | |
| end | |
| module Isono |
| require 'sinatra/base' | |
| require 'sequel' | |
| $LOAD_PATH << "." | |
| autoload :Post, "post" | |
| class MyApp < Sinatra::Base | |
| configure do | |
| DB = Sequel.connect("sqlite://sample.db") | |
| end | |
| end |
| adapters.add("remote", ["url", "type", "additionalfields"], function (options) { | |
| var value = { | |
| url: options.params.url, | |
| type: options.params.type || "GET", | |
| data: {} | |
| }, | |
| prefix = getModelPrefix(options.element.name); | |
| $.each(splitAndTrim(options.params.additionalfields || options.element.name), function (i, fieldName) { | |
| var paramName = appendModelPrefix(fieldName, prefix); |
| : succ 1 + ; | |
| : drop2 drop drop ; | |
| : mod=0 mod 0 == ; | |
| : fb' dup 15 mod=0 if "fizzbuzz" . else dup 5 mod=0 if "buzz" . else dup 3 mod=0 if "fizz" . else dup . then then then ; | |
| : fb ; | |
| : fb dup2 >= if fb' succ fb else drop2 then ; | |
| 100 1 fb |