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
@sloanlance
sloanlance / jq_jsonl_conversion.md
Last active March 22, 2024 18:05
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

@ajschumacher
ajschumacher / mspacman.py
Created January 12, 2017 22:27
play Ms. Pacman w/ OpenAI gym
import time
import pygame
import gym
frame_time = 1.0 / 15 # seconds
pygame.init()
@dbp
dbp / circle.yml
Last active June 29, 2017 09:53
Haskell project with Stack on CircleCI
dependencies:
cache_directories:
- "~/.stack"
pre:
- wget https://github.com/commercialhaskell/stack/releases/download/v0.1.2.0/stack-0.1.2.0-x86_64-linux.gz -O /tmp/stack.gz
- gunzip /tmp/stack.gz && chmod +x /tmp/stack
- sudo mv /tmp/stack /usr/bin/stack
override:
- stack setup
- stack build
@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 にかなり依存してるので、まずはこれらを理解することが重要
@okumin
okumin / akka-persistence.md
Created September 28, 2014 08:55
akka-persistenceのプラグインをつくろう
@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) {
@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>
@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
@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.

@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: