この記事は NewsPicks Advent Calendar 2018 の3日目の記事です。
NewsPicksで働いている masa_edw です。
入社後一ヶ月経ったばかりで技術的には何か言えるほどのことをまだしておらず、サービスや会社のことについて語るのもおこがましかろうということで、自分語りをします。
function e() { | |
if [ -z `pgrep Emacs` ]; then | |
env LANG=C open -a Emacs "$@" | |
return | |
fi | |
local client="/Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient" | |
local uid=`id -u` | |
local socket="$TMPDIR"/emacs"$uid"/server |
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); |