Skip to content

Instantly share code, notes, and snippets.

View oppara's full-sized avatar
:octocat:
::

oppara oppara

:octocat:
::
View GitHub Profile
@Yasuhisa
Yasuhisa / gist:9487c426c6c4fc53a5439af2a78fe037
Last active May 22, 2021 05:19
Google Apps Script で Trello のリストからカードをインポートする系のスクリプト
const scriptProp = PropertiesService.getScriptProperties().getProperties();
const KEY = scriptProp.TRELLO_API_KEY;
const TOKEN = scriptProp.TRELLO_TOKEN;
const LISTID = scriptProp.TRELLO_LIST_ID;
/**
* Trello カード
*/
type Card = {
id: string;
@oppara
oppara / wordpress_sync.md
Last active October 21, 2022 09:19
WordPress の同期
@s-tajima
s-tajima / DenyDisableAudit.json
Created November 20, 2019 15:01
AWS SCPs Policies
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Deny",
"Action": [
"organizations:LeaveOrganization",
"config:DeleteConfigRule",
"config:DeleteConfigurationRecorder",
"config:DeleteDeliveryChannel",
@TAKEDA-Takashi
TAKEDA-Takashi / aws-iam-user-key-rotation.sh
Created May 16, 2019 08:26
指定したAWSプロファイルのアクセスキー をローテーションするスクリプト。
#!/bin/bash -euo pipefail
#
# Usage:
# $ aws-iam-user-key-rotation.sh [profile] [credential_file]
#
declare -x AWS_DEFAULT_PROFILE=${1:-default}
declare credential_file=${2:-~/.aws/credentials}
declare -x AWS_SHARED_CREDENTIALS_FILE=$credential_file
@bluecat76
bluecat76 / summernote-ext-minidiag.js
Created March 16, 2016 14:56
Minimal dialog example for summernote v0.8.1
(function (factory) {
/* global define */
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals

マージ済みのリモートブランチを全て削除

git branch -r --merged master | grep -v -e master -e develop | sed -e 's% *origin/%%' | xargs -I% git push --delete origin %
  1. remote の master に merge済み の branch をすべて表示して
  2. master と develop は消えてほしくないので除外して
  3. origin/ を削除して
  4. xargs (-I% % で ブランチ名を渡しつつ、全て削除する)
@yuumi3
yuumi3 / redmine_textile2md.rb
Last active October 28, 2019 01:30
Convert Textile to Markdown contents in Redmin
def textile_to_markdown(textile)
d = []
pre = false
table_header = false
text_line = false
textile.each_line do |s|
s.chomp!
<?php
echo <<<T_WADA
     ,、,,,、,,,
    _,,;' '" '' ;;,,
  (rヽ,;''""''゛゛;,ノr)    
   ,; i ___ 、___iヽ゛;,  テスト書いてないとかお前それ@t_wadaの前でも同じ事言えんの?
  ,;'''|ヽ・〉〈・ノ |゙ ';,
  ,;''"|   ▼   |゙゛';,
  ,;'' ヽ _人_ / ,;'_
@sonots
sonots / fluentd_hacking_guide.md
Last active August 30, 2021 05:57
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ