Skip to content

Instantly share code, notes, and snippets.

@sbuss
sbuss / main.go
Last active August 15, 2019 20:23
Stackdriver logging with request grouping for App Engine Go 1.11
// Sample logging-quickstart writes a log entry to Stackdriver Logging.
package main
import (
"context"
"fmt"
"log"
"net/http"
"os"
"strings"
@fukuiretu
fukuiretu / index.d.ts
Last active November 27, 2021 15:57
Nuxt.jsで必要なTypeScriptの型定義
import Vue from 'vue'
import { Route } from 'vue-router'
import { Store } from 'vuex'
import { MetaInfo } from 'vue-meta'
import { AxiosInstance } from 'axios'
interface NuxtContext {
isClient: boolean
isServer: boolean
isStatic: boolean
@s-kiriki
s-kiriki / gist:d18fd2be18040e0718d6
Last active October 31, 2016 04:12
【ChatOps用】Github上のプルリクを作るHubotスクリプト
# Description:
# create pull requests in a Github repository
#
# Dependencies:
# "githubot": "0.4.x"
#
# Configuration:
# HUBOT_GITHUB_TOKEN
# HUBOT_GITHUB_API
#
@sorah
sorah / relink.sh
Last active August 29, 2015 13:57
homebrew: link missing LinkedKegs again
@shyouhei
shyouhei / git-strata.rb
Last active December 8, 2019 07:35
This is git-strata, an extended version of git-blame. It takes a path and generates git-blame like output. The difference is, it also shows you how much edits the line experienced.
#! /your/favourite/path/to/ruby
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Urabe, Shyouhei
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# for Amon2
# spy on render method
sub render_spec {
my ($cb, $req, $spec) = @_;
my $template;
my $param;
no warnings qw/redefine once/;
my $render = *Amon2::Web::render;
# for capture arguments of render method
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.20179691910743713</real>
<key>Green Component</key>
<real>0.1818026602268219</real>
@Nyoho
Nyoho / gist:5018563
Created February 23, 2013 05:12
rbenv で新しいバージョンをインストールしてついでに gem もごっそり移行する。zsh の補完も効くようにしてみた。.zshrc の compinit に後に。
## completion for gem transition of rbenv
function gem-transition {
local tmpfile=/tmp/current_gem_list
if [ $# -ne 2 ]; then
echo "usage: command version1 version2"
return
fi
rbenv install $2
rbenv global $1
rbenv rehash
@mochiz
mochiz / gist:4736183
Last active April 16, 2023 03:56
rbenvとruby-buildでRuby環境を最新に保つ

rbenvとruby-buildでRuby環境を最新に保つ

更新日:2014/11/19

rbenv, ruby-buildを更新

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master