Skip to content

Instantly share code, notes, and snippets.

View arkenous's full-sized avatar

KOSAKA Kensuke arkenous

View GitHub Profile
@xhiroga
xhiroga / kotlinfest2019.md
Last active January 3, 2020 04:19
Kotlin Fest 2019 登壇資料まとめ
@Tea-Ayataka
Tea-Ayataka / Timer.kt
Created September 15, 2018 08:54
Kotlin Coroutine Timer
package net.ayataka.bas.utils
import kotlinx.coroutines.experimental.*
import net.ayataka.bas.LOGGER
import kotlin.system.measureTimeMillis
fun CoroutineScope.timer(interval: Long, fixedRate: Boolean = true, action: suspend TimerScope.() -> Unit): Job {
return launch {
val scope = TimerScope()
@smileyborg
smileyborg / SelfSizingTableHeaderAndTableFooterViews.swift
Last active February 9, 2024 09:53
How to manually self-size UITableView tableHeaderView/tableFooterView in iOS 11
// For the best results, your tableHeaderView/tableFooterView should be a UITableViewHeaderFooterView with your content inside the contentView.
let tableHeaderView = UITableViewHeaderFooterView()
let fittingSize = CGSize(width: tableView.bounds.width - (tableView.safeAreaInsets.left + tableView.safeAreaInsets.right), height: 0)
let size = tableHeaderView.systemLayoutSizeFitting(fittingSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel)
tableHeaderView.frame = CGRect(origin: .zero, size: size)
tableView.tableHeaderView = tableHeaderView
// When you set this view to the tableHeaderView/tableFooterView on the table view, the table view will preserve the existing size of its frame.
// If you need to change the size, remove the tableHeaderView/tableFooterView, set a new frame on it, then re-set it on the table view again.
@nomuken
nomuken / README.md
Created June 13, 2016 06:32
ArchLinux(Kernel 4.6.2-1-ARCH + gcc 6.1.1)向けVMwareのvmware-modconfigを通るようにするpatch達

これは何

ArchLinux(Kernel 4.6.2-1-ARCH + gcc 6.1.1)向けVMwareのvmware-modconfigを通るようにするpatch達です. ググった時に,見つかった解決方法を行うpatchです.

修正は次のURLで示されるやつを行いました.

使い方

  1. 次のファイルを解凍
  • /usr/lib/vmware/modules/source/vmnet.tar
@shyouhei
shyouhei / gist:0b7dab3e75bfbf96f895
Created March 31, 2015 15:26
新社会人の人が留意すべき事項

新社会人に必須である:

  • 勤務先との書面による「労働契約」。業務委託契約等NG。
  • 多寡を問わず毎月払われる給料。遅配等論外である。
  • 健康保険。
  • 労災保険。
  • 雇用保険。
  • 三六協定。
  • 年次有休。
  • 育児休業の制度があり取得者がいる会社に勤務する。
@hayajo
hayajo / changelog_en.md
Last active May 3, 2024 08:29
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@superdaigo
superdaigo / zabbix-alert-smtp.sh
Created September 20, 2012 04:58
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header