Skip to content

Instantly share code, notes, and snippets.

View ma3tk's full-sized avatar
💪
On GYM

Masataka Sato ma3tk

💪
On GYM
  • Findy Inc.
  • Tokyo, Japan
  • X @ma3tk
View GitHub Profile
@ma3tk
ma3tk / tampermonkey.js
Created January 5, 2021 09:40
GitHub issue タブとシフトタブでスペース挿入 / tampermonkey
// ==UserScript==
// @name タブとシフトタブでスペース挿入
// @namespace http://tampermonkey.net/
// @version 0.1
// @description issue書く時にタブ使うと項目移動しちゃうので、無効にしてスペースが入るようになりました
// @author @ma3tk
// @match https://github.com/*
// @grant none
// @see https://qiita.com/n-ishida/items/da1cc0cfdaebe789d047
// @see https://qiita.com/laineus/items/12a220d2ab086931232d
@ma3tk
ma3tk / file0.txt
Last active May 29, 2019 11:26
Mac + Nexus5 で Android L を最初からインストールしてみる ref: https://qiita.com/ma3tk/items/437e81a7eefe137fca41
$ mkdir ~/eclipse/
$ mv ~/Downloads/adt-bundle-mac-x86_64-20140702 ~/eclipse/
@ma3tk
ma3tk / pz-linkcard__lib__pz-linkcard-style.php
Created February 10, 2017 13:51
pz-linkcard の SSL 化
<?php if (!function_exists("get_option")) die; ?>
<?php
if (!isset($this->options['style']) || !$this->options['style']) {
// $css_file = plugin_dir_path(__FILE__).'style.css';
// $css_url = plugin_dir_url(__FILE__).'style.css';
$wp_upload_dir = wp_upload_dir();
$wp_upload_dir_base_dir = set_url_scheme( $wp_upload_dir['basedir'] , 'https' );
$wp_upload_dir_base_url = set_url_scheme( $wp_upload_dir['baseurl'] , 'https' );
$css_dir = $wp_upload_dir_base_dir.'/'.$this->slug;
@ma3tk
ma3tk / delete-remote-branches.sh
Created February 12, 2016 07:09
Delete "Merged branches in Remote" with fetch
git fetch --prune; git branch -a --merged | grep -vE '^\*|master$|develop$|release$' | grep remotes/origin | sed -e 's% *remotes/origin/%%' | xargs -I% git push origin :%
#!/bin/sh
opt=$1
if [ "$opt" = "--develop" ]; then
CONFIGURATION=release
PACKAGE_NAME="net.hoge"
HOGE_BUILD_CONFIG="11"
HOGE_DEBUG='-DHOGE_DEBUG=1'
BUILD_CONFIG_JAVA="Target.Develop"
APP_NAME="HOGE(dev)"
@ma3tk
ma3tk / gist:7675959
Created November 27, 2013 13:48
ファイル名
login ログイン
question 問題一覧画面
answer 回答画面
admin_login ログイン
admin_user_list 参加者一覧画面
admin_user_add 参加者追加画面
admin_question_list 問題一覧画面
admin_question_add 問題作成画面
<?php
/**
* Input_BiblManager.php
*
* @author {$author}
* @package Input
* @version $Id: a17b62fb78834da3c636228f401e740cd5bfdb64 $
*/
//require_once INPUT_BASE_URL_APP_APPMANAGER;
@ma3tk
ma3tk / gist:7164450
Created October 26, 2013 02:01
mysql
> cat /etc/my.cnf
[mysqld]
# Settings user and group are ignored when systemd is used (fedora >= 15).
# If you need to run mysqld under different user or group,
# customize your systemd unit file for mysqld according to the
# instructions in http://fedoraproject.org/wiki/Systemd
user=mysql
datadir=/var/lib/mysql
@ma3tk
ma3tk / gist:6060520
Last active December 20, 2015 02:59
neapolitan
<?php
$str = "gtgtsgipgttptinggipsppaigsesgpetgstpatetisiesagaeaigttetepitiatsegssieeeeatepaaiagtpieataatppiitgiapsteitatiiatpetetetttgpetpaasipttssstpeeeggtiagtttegtiipestsasgpsepaasapttgattgiatppegitiatpasgatgepttggapesaeetaeissttggieietgspagesiipestipggstttpateptitiaetottissgggtttaipappgstsptttgtpispattgegstltiappseisapgistaiagteeiptptpisaieisagstapeteietgteiisgtiptstgtstasspeatspptitttatteastsgtptgtasggpniaaeteaisett";
$nea = "neapolitan";
$str_len = strlen($str);
$nea_len = strlen($nea);
$j = 0;
$out = "";
for($i = 0; $i < $str_len; $i++) {
@ma3tk
ma3tk / journalctl
Last active August 29, 2015 14:25
for openstf
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="+job log(pull, openstf/stf:latest, )"
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="-job log(pull, openstf/stf:latest, ) = OK (0)"
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="-job pull(openstf/stf, latest) = OK (0)"
Jul 24 22:21:26 openstf docker[31453]: 06319d6820e8: Download complete
Jul 24 22:21:26 openstf docker[31453]: Status: Image is up to date for openstf/stf:latest
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="POST /v1.17/containers/stf-app-3100/kill?signal=KILL"
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="+job kill(stf-app-3100, KILL)"
Jul 24 22:21:26 openstf docker[2383]: No such container: stf-app-3100
Jul 24 22:21:26 openstf docker[2383]: time="2015-07-24T22:21:26+09:00" level=info msg="-job kill(stf-app-3100, KILL) = ERR (1)"
Jul 24 22:21:26 ope