Skip to content

Instantly share code, notes, and snippets.

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

Yasutaka Kawamoto kwmt

🏠
Working from home
View GitHub Profile
@shikajiro
shikajiro / PerformanceMeasure.kt
Last active July 4, 2021 15:18
処理の実行時間を計測してログに出力する便利ロジック
/**
* 処理の実行時間を計測してログに出力する便利ロジック
* buildConfigFieldのPERFORMANCEフラグがtrueのとき、かつ、デバッグ時のみ計測される
呼び出しサンプル:
```
val result: String
measure("copy time") {
// 計測したい処理
result = execute()
//
// AppDelegate.swift
// Pasty
//
// Created by Federico Vitale on 22/05/2019.
// Copyright © 2019 Federico Vitale. All rights reserved.
//
import Cocoa
#!/bin/bash
VERSIONS=$(gcloud app versions list --service $1 --sort-by '~version' --format 'value(version.id)')
COUNT=0
echo "Keeping the $2 latest versions of the $1 service"
for VERSION in $VERSIONS
do
((COUNT++))
if [ $COUNT -gt $2 ]
then
@ecoopnet
ecoopnet / mpeg2gif
Last active December 23, 2021 10:02
#!/bin/sh
# Convert mp4 video to animation GIF.
# Requirement: ffmpeg
if [ -z "$1" ]; then
(
echo "Usage: $(basename $0) video-file.mp4 [extra-options]
Convert mp4 video to animation GIF.
i.e: if ~/Downloads/video-file.mp4 was passed, ~/Downloads/video-file.gif was generated.
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active April 5, 2024 15:47
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)