Skip to content

Instantly share code, notes, and snippets.

View exoego's full-sized avatar
🏠
Working from home

TATSUNO “Taz” Yasuhiro exoego

🏠
Working from home
View GitHub Profile
@exoego
exoego / redmine-view-customize-gannt-starting-month.js
Last active December 2, 2015 01:06
Redmine - View Customize - Shows gannt view starting 2 monthes ago
// ガントチャートを2ヶ月前開始で表示
// Shows gannt view starting 2 months ago
$(document).ready(function(){
// configurable
var monthsAgo = 2;
var monthsRange = 6;
// -----
var now = new Date();
var thisMonth = now.getMonth() + 1;
var thisYear = now.getFullYear();
@Controller
public class SearchController {
@Autowired
private SearchService searchService;
@RequestMapping("/search")
public String search(
@ModelAttribute("searchForm")
SearchForm searchForm,
Model model) {
@exoego
exoego / gist:cdd753c44c07b27b5b0cae809b610d7f
Created December 7, 2016 08:42
Jupyter-Scala: Unexpected error message
In [6]: case class State[S](run: S => S)
Out[6]: defined class State
In [7]: case class Gen[A](sample: State[A])
Out[7]: defined class Gen
In [8]: Gen(State[Int](a => a))
Something unexpected went wrong =(scala.reflect.internal.Types$TypeError: value <none> is not a member of Object{implicit lazy val derive$macro$71(): pprint.PPrint[$sess.cmd7.wrapper.cmd6.wrapper.Gen[Int]]; implicit lazy val derive$macro$74(): pprint.PPrint[cmd6Wrapper.this.cmd5.wrapper.State[Int]]; def derive$macro$84(): pprint.PPrint[$sess.cmd7.wrapper.cmd6.wrapper.Gen[Int]]}
scala.tools.nsc.typechecker.Contexts$ThrowingReporter.handleError(Contexts.scala:1402)
scala.tools.nsc.typechecker.Contexts$ContextReporter.issue(Contexts.scala:1254)
@exoego
exoego / FooTest.scala
Last active September 5, 2017 01:21
ScalaJS で js.Object なクラスのインスタンスを生成して、そのLong型のフィールドを参照するとUndefinedBehaviorError
import org.scalatest.{ FunSpec, Matchers }
import scala.scalajs.js
@js.native
trait Foo extends js.Object {
val sizeBytes: Long = js.native
}
object Foo {
def apply(sizeByte: js.UndefOr[Long] = js.undefined): Foo = {
@exoego
exoego / I'm an early 🐤
Last active April 22, 2025 00:52
I'm an early
🌞 Morning 456 commits ██████▏░░░░░░░░░░░░░░ 29.6%
🌆 Daytime 554 commits ███████▌░░░░░░░░░░░░░ 36.0%
🌃 Evening 502 commits ██████▊░░░░░░░░░░░░░░ 32.6%
🌙 Night 29 commits ▍░░░░░░░░░░░░░░░░░░░░ 1.9%
Go 19 hrs 30 mins ██████████████░░░░░░░ 67.0%
Kotlin 2 hrs 56 mins ██▏░░░░░░░░░░░░░░░░░░ 10.1%
TOML 2 hrs 11 mins █▌░░░░░░░░░░░░░░░░░░░ 7.5%
YAML 1 hr 2 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.6%
Markdown 56 mins ▋░░░░░░░░░░░░░░░░░░░░ 3.3%
@exoego
exoego / action.yaml
Created November 25, 2021 06:57
GitHub Actions to update Rust aws-sdk crates
name: Update AWS SDK crates daily
on:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
@exoego
exoego / ruby-version-crawler.sh
Last active March 16, 2022 02:49
Fetch .ruby-version in company repo
#!/bin/zsh
OWNER=my-company
gh search repos \
--owner=$OWNER \
--language=ruby \
--visibility=private \
--archived=false \
--json="name,defaultBranch" \
@exoego
exoego / ignore-lambda-version-with-jest-cdk-snapshot.ts
Created March 23, 2023 07:40
How to ignore AWS::Lambda::Version with jest-cdk-snapshot
import * as cdk from "aws-cdk-lib";
export function getSubsetResourceTypes(stack: cdk.Stack): string[] {
const subResources = stack.node.children.map((child) => child.node.defaultChild as unknown as cdk.CfnResource | undefined);
return subResources.map((sub) => sub?.cfnResourceType).filter((t) => t !== undefined) as string[];
}
expect(lambdaStack).toMatchCdkSnapshot({
ignoreAssets: true,
subsetResourceTypes: getSubsetResourceTypes(stack.lambda).filter((t) => t !== "AWS::Lambda::Version"),
@exoego
exoego / cli.sh
Created April 13, 2023 01:23
GitHub CLI to filter PRs
#!/bin/bash
# Equivalent to "author:exoego is:merged created:>2022-02-28" in Web UI
gh search prs --limit=1000 --author=exoego --created=">2022-02-28" --merged -- -user:exoego -user:scala-steward-org