Skip to content

Instantly share code, notes, and snippets.

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

KAWASHIMA Yoshiyuki ykws

🏠
Working from home
View GitHub Profile
@koshatul
koshatul / README.md
Last active June 12, 2024 14:51
use Apple Keychain to store GPG Passphrases

gpg-agent setup

Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)

$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

@takahirom
takahirom / EventBus.kt
Last active June 8, 2024 14:09
EventBus by Kotlin coroutine
import kotlinx.coroutines.experimental.channels.BroadcastChannel
import kotlinx.coroutines.experimental.channels.ConflatedBroadcastChannel
import kotlinx.coroutines.experimental.channels.ReceiveChannel
import kotlinx.coroutines.experimental.channels.filter
import kotlinx.coroutines.experimental.channels.map
import kotlinx.coroutines.experimental.launch
import javax.inject.Inject
import javax.inject.Singleton
@edisonlo
edisonlo / verifyECDSASignature.m
Last active March 14, 2020 03:53
Obj-c verify ECDSA signature
- (IBAction)ecdsaAction:(id)sender {
NSData *privateKeyPEMData = [[NSFileManager defaultManager] contentsAtPath: [[NSBundle mainBundle] pathForResource:@"ec_private_key" ofType:@"p12" ]];
if(privateKeyPEMData){
NSLog(@"privateKeyPEMData NOT NULL");
SecKeyRef privateKey = [self getPrivateKeyRefrenceFromData:privateKeyPEMData password:@"12345678"];
if(privateKey){
NSLog(@"private key is NOT NULL!!");
@GonzalezAnguita
GonzalezAnguita / UIViewExtension.swift
Last active February 9, 2019 12:56
Border and corner extension for UIView - Swift 3
//
// Credits to:
// https://gist.github.com/feighter09/c502d7550e4cdb82d526157f5cf8bef1
// http://nshipster.com/ibinspectable-ibdesignable/
//
// Created by José Tomás González on 23-04-17.
// Copyright © 2017 Swipe. All rights reserved.
//
import Foundation
<!--
In Vue, we use v-model for all form bindings, while
Knockout maintains separate binding types, such as
textInput, checked, and options. In some cases,
such as for an input of type "range", Knockout
simply doesn't have an equivalent two-way binding
helper and the more verbose value and valueUpdate
must be used.
-->
<div id="app">
@zburgermeiszter
zburgermeiszter / import.sh
Created April 7, 2016 12:55
Import sql file to MariaDB in Docker
docker exec -i CONTAINER_ID /bin/bash -c "export TERM=xterm && mysql -proot -uroot database" < import.sql
@chriseidhof
chriseidhof / tableviews.swift
Last active October 15, 2023 20:56
trySwift
import UIKit
// If you enjoyed this talk (video link will be up soon), then you might also enjoy our book Advanced Swift: http://www.objc.io/books/advanced-swift
struct Person {
let name: String
let city: String
}
let people = [
@parmentf
parmentf / GitCommitEmoji.md
Last active June 16, 2024 18:45
Git Commit message Emoji
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE