Skip to content

Instantly share code, notes, and snippets.

# update_pr_desc.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import requests
import time
import json
import sys
import os
@shinofara
shinofara / cloudbuild.yaml
Last active July 11, 2020 02:51
Application Repository
steps:
- name: gcr.io/cloud-builders/gcloud
id: 'setup_ssh'
entrypoint: 'bash'
args:
- '-c'
- |
<ここに秘密鍵をSecret Managerなどから取ってくる処理>
git config --global url."git@github.com:".insteadOf "https://github.com/"
volumes:
@shinofara
shinofara / app.yaml
Last active April 30, 2018 03:22
hugo app.yaml
service: <YOUR SERVICE NAME>
runtime: python27
api_version: 1
threadsafe: false
skip_files:
- .git/*
handlers:
- url: /(.*\.css)
package main
import (
"encoding/json"
// "encoding/base64"
"fmt"
"net/http"
"strings"
"bytes"
"io"
@shinofara
shinofara / generate.sh
Last active October 26, 2017 16:53
SSL GENERATE MAC ONLY
#!/bin/bash
set -eu
atexit() {
[[ -n $tmpdir ]] && rm -fr "$tmpdir"
[[ -n $sslconf ]] && rm -fr "$sslconf"
}
tmpdir=`mktemp -d`
sslconf=`mktemp`
trap atexit EXIT
trap 'trap - EXIT; atexit; exit -1' SIGHUP SIGINT SIGTERM
@shinofara
shinofara / makeTestFiles.sh
Created July 16, 2016 16:29
makeTestFiles.sh
#!/bin/bash
rm -rf testdata/*
for i in {0..10};do
mkdir testdata/dir${i}
for j in {0..50};do
mkfile 50m testdata/dir${i}/test-${j}.txt
done
done
@shinofara
shinofara / 20160501_2044_main.py
Last active January 25, 2021 11:47
webスクレイピングして、slackに通知
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2 as request
from bs4 import BeautifulSoup
import re
import urllib
import datetime
import json
@shinofara
shinofara / 20160416_2000_circle.yml
Last active July 2, 2018 05:27
CircleCIで複数のバージョンのGo言語をテストしてみた。
machine:
environment:
GO15VENDOREXPERIMENT: 1
GOROOT: "/home/ubuntu/go"
PATH: "/home/ubuntu/go/bin:$PATH"
dependencies:
cache_directories:
- "/home/ubuntu/.go"
pre:
@shinofara
shinofara / 20160416_1800_circle.yml
Last active May 1, 2016 11:46
CircleCIの並列実行をGo言語を使って試してみた
machine:
environment:
GO15VENDOREXPERIMENT: 1
GOROOT: "/home/ubuntu/go"
PATH: "/home/ubuntu/go/bin:$PATH"
dependencies:
cache_directories:
- "/home/ubuntu/go"
pre:
@shinofara
shinofara / gist:ffa24fe5b002fde56f5df50aae45d985
Created April 10, 2016 10:03
This golang script is LINE BOT API
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"os"