This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1.20-alpine as builder | |
RUN apk update && apk add --repository http://dl-cdn.alpinelinux.org/alpine/v3.4/main --no-cache ca-certificates gcc libc-dev | |
WORKDIR /app | |
COPY go.* ./ | |
RUN go mod download | |
COPY run/ ./run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div data-controller="clipboard"> | |
<button data-action="click->clipboard#copy" type="button" data-clipboard-target="value" data-copy="some copy text"></button> | |
<div data-clipboard-target="tooltip" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700"> | |
Copied! | |
<div class="tooltip-arrow" data-popper-arrow></div> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DataScanner.swift | |
// DataScanner | |
// | |
// Created by Shinichiro Aska on 8/20/15. | |
// Copyright © 2015 Shinichiro Aska. All rights reserved. | |
// | |
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Security | |
class Keychain { | |
class func save(key: String, data: NSData) -> Bool { | |
let query = [ | |
kSecClass as String : kSecClassGenericPassword as String, | |
kSecAttrAccount as String : key, | |
kSecValueData as String : data ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_ID="some-project-id" | |
ENV="dev" | |
TARGETS=$(shell grep -E '^deploy-function[a-zA-Z_-]+:' $(MAKEFILE_LIST) | cut -d : -f 1) | |
deploy-all: $(TARGETS) | |
deploy-function_some: | |
gcloud --project $(PROJECT_ID) functions deploy --region asia-northeast1 SomeFunction \ | |
--set-env-vars PROJECT_ID=$(PROJECT_ID),RUNTIME_ENVIRONMENT=$(ENV) \ | |
--runtime go111 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const now = new Date(); | |
const addDays = function(date, days) { | |
const d = new Date(date); | |
d.setDate(d.getDate() + days); | |
return d; | |
}; | |
const toYMD = function(date) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
"use strict"; | |
const template = '<span class="fontsize-m" style="margin-right: 6px;"><a href="https://stocks.finance.yahoo.co.jp/stocks/detail/?code={{ .stock.Code }}.T" class="underline">{{ .stock.Code }}(JQ)</a></span>{{ .stock.Close | Commify }}円 <br class="show_sp"><small class="fontsize-m">前日比:{{ .stock.Diff | Commify }}円 出来高:{{ .stock.Volume | Commify }}株</small>'; | |
const script = document.createElement('script'); | |
script.src = 'https://denkei-agh-tools-prod.an.r.appspot.com/?callback=stockWidgetCallback&symbol=1783.T'; | |
const parent = document.getElementsByTagName('script')[0]; | |
parent.parentNode.insertBefore(script, parent); | |
window.stockWidgetCallback = (res) => { | |
console.log(res); | |
const inner = document.getElementById('widget-inner'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.sortable.app; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Color; | |
import android.os.Bundle; | |
import android.view.LayoutInflater; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.ViewGroup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// before html | |
// <html lang="ja"> | |
// <span data-text-ja="タイムライン">Timeline</span> | |
// | |
// var localizer = new Localizer(); | |
// localizer.localize(); | |
// | |
// after html | |
// <span data-text-ja="タイムライン">タイムライン</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"net/http" | |
"strings" | |
) | |
func main() { | |
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { |
NewerOlder