Skip to content

Instantly share code, notes, and snippets.

@dictav
dictav / ime_ios.swift
Created May 5, 2023 00:56
擬似IMEっぽい何か
import UIKit
import PlaygroundSupport
class ViewController: UIViewController {
var label: UILabel?
var textField: TextField?
override func viewDidAppear(_ animated: Bool) {
self.becomeFirstResponder()
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
@dictav
dictav / experiment.go
Last active March 30, 2022 19:31
Go 1.18 Experiment files
package main
type Experiment struct{}
@dictav
dictav / docker_aws.sh
Created July 20, 2021 14:05
aws cli using docker
#!/bin/sh
session=~/.aws/session
establish_session() {
read -p 'code: ' code
file=$(uuidgen)
envs=$(env | grep AWS | sed -e 's/^/-e /')
docker run --rm -it -v $PWD:/work $envs --workdir /work --entrypoint bash amazon/aws-cli -c "aws sts get-session-token --serial-number $AWS_MFA_DEVICE --token-code $code > /work/$file"
@dictav
dictav / README.md
Last active February 17, 2021 01:36
Terminal.app open tabs always

In Terminal.app, ⌘+N (New Window with Profile) open a new tab always. rm ~/Library/Preferences/com.apple.Terminal.plist and defaults delete com.apple.Terminal do not fix this problem.

Finaly, I found the solution!

Screen Shot 2021-02-17 at 10 28 13

I don't remember touching this setting. Perhaps it was default setting of macOS version when I setup.

steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- '--no-cache'
- '-t'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- grpc/hello
- '-f'
- grpc/hello/Dockerfile
@dictav
dictav / inline_cloudbuild.yaml
Last active August 3, 2020 05:52
CloudRun+Git
steps:
- name: gcr.io/cloud-builders/docker
args:
- build
- '--no-cache'
- '-t'
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME:$COMMIT_SHA'
- grpc/hello
- '-f'
- grpc/hello/Dockerfile
@dictav
dictav / com.apple.opendirectoryd.plist
Created October 30, 2018 05:47
com.apple.opendirectoryd.plist
{
"Label": "com.apple.opendirectoryd",
"Program": "/usr/libexec/opendirectoryd",
"EnvironmentVariables": {
"__CF_USER_TEXT_ENCODING": "0x0:0:0",
"__CFPREFERENCES_AVOID_DAEMON": "1"
},
"POSIXSpawnType": "Interactive",
"MachServices": {
"com.apple.system.DirectoryService.libinfo_v1": true,
@dictav
dictav / app.go
Last active April 27, 2018 02:14
AppEngine Go User API Authentication
package app
import (
"fmt"
"net/http"
"strings"
"google.golang.org/appengine"
"google.golang.org/appengine/user"
)
@dictav
dictav / sample.js
Last active April 25, 2018 02:08
vimrc indentLine
function foo() {
if (0) {
if (0) {
if (0) {
console.log("not called")
}
}
}
}