Skip to content

Instantly share code, notes, and snippets.

View akiomik's full-sized avatar
🇺🇦
I may be slow to respond.

Akiomi Kamakura akiomik

🇺🇦
I may be slow to respond.
View GitHub Profile
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@sloanlance
sloanlance / jq_jsonl_conversion.md
Last active May 3, 2024 10:26
jq: JSONL ↔︎ JSON conversion

jq: JSONL ↔︎ JSON conversion

Prerequisites

  • jqhttps://jqlang.github.io/jq/ — "like sed for JSON data"

    There are several options available for installing jq. I prefer to use Homebrew: brew install jq

  1. JSONL → JSON

@timcheadle
timcheadle / README.md
Last active January 26, 2023 00:56
Make /robots.txt aware of the Rails environment

Make /robots.txt aware of the Rails environment

You probably don't want Google crawling your development staging app. Here's how to fix that.

$ mv public/robots.txt config/robots.production.txt
$ cp config/robots.production.txt config/robots.development.txt

Now edit config/routes.rb to add a route for /robots.txt, and add the controller code.

@terut
terut / spec_helper.rb
Created November 21, 2011 13:33
Clean up carrierwave's files for rspec.
RSpec.configure do |config|
# ...
config.after(:all) do
if Rails.env.test?
FileUtils.rm_rf(Dir["#{Rails.root}/spec/support/uploads"])
end
end
end
# put logic in this file or initalizer/carrierwave.rb
@okumin
okumin / akka-persistence.md
Created September 28, 2014 08:55
akka-persistenceのプラグインをつくろう
@froop
froop / index.html
Created April 12, 2013 07:21
Web ブラウザのポップアップブロック問題
<body>
<script>
function popupNonBlock() {
var win = window.open("", "child", "width=400, height=300");
win.document.body.innerHTML = "loading...";
location.href = 'opener.html';
}
</script>
<a href="opener.html">block</a>
@xuwei-k
xuwei-k / scalaz-stream.md
Last active June 24, 2021 01:09
Scalaz-Streamの基本的なクラスや概念まとめ

Scalaz-Streamの基本的なクラスや概念まとめ

  • versionは0.7a

scalaz-streamが依存してるライブラリ内のclass

  • scalaz-streamではなくscalaz-concurrentにあるクラス
  • scalaz-streamは、これと Task にかなり依存してるので、まずはこれらを理解することが重要
@travisbrown
travisbrown / fizzbuzz-faster.scala
Created November 18, 2012 23:19
FizzBuzz in the type system (faster)
import shapeless._, Nat._
trait FizzBuzz[N <: Nat] {
type R3 <: Nat
type R5 <: Nat
def ti: ToInt[N]
def prev: List[String]
def d3: R3 =:= _0
def d5: R5 =:= _0
@vvakame
vvakame / idobata-api.js
Last active May 16, 2019 14:57
idobataはAPIのドキュメントがないので頑張って調べた https://idobata.io/
var http = require("https");
var qs = require('querystring');
var Pusher = require('pusher-client');
var urlBase = "https://idobata.io";
var token = "xxxxx"; // ここにBOTのtokenいれる
var pusherKey = "44ffe67af1c7035be764";
function request(method, path, params) {
@kmizu
kmizu / recommendation.md
Created October 2, 2011 12:15
ウォッチすべきScalaエンジニア(海外/日本人)のTwitterアカウント

フォローしておいた方がいいようなScalaエンジニア(海外勢/日本人)のTwitterアカウント

概要

海外勢/日本人のScala(エンジニア/ユーザ)の中で、特にフォローしておくといい方のTwitterアカウントを集めてみました。作成途中なので、突っ込み歓迎。fork歓迎。

海外

  • @robey Twitterの中の人。ScalaによるメッセージキューKestrelを作ったのもこの人。
  • @n8han 今話題のhttpツールキットUnfilteredの作者。NYのScalaエンジニアの中でも有名人。他にも、conscriptを初めとして、多数のプログラムを開発している。詳細は彼のgithub アカウント 参照。