- Arch だと Python のバージョンが 3 なので gcloud が動かない。
sudo pacman -S python
export CLOUDSDK_PYTHON=/usr/bin/python2
- GCE にアクセスするときに nojima ユーザでアクセスすると gcloud が動かない。
- パーミッションの問題。
- ubuntu ユーザでアクセスする。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -ex | |
cd $(dirname $0) | |
if [ -f Makefile ]; then | |
make clean | |
fi | |
./configure \ | |
--with-cc-opt="-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2" \ | |
--with-ld-opt="-Wl,-Bsymbolic-functions -Wl,-z,relro" \ | |
--prefix=/usr/local \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// slack-logger/main.go | |
package main | |
import ( | |
"encoding/json" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: lib/Format/ContinuationIndenter.cpp | |
=================================================================== | |
--- lib/Format/ContinuationIndenter.cpp (revision 216461) | |
+++ lib/Format/ContinuationIndenter.cpp (working copy) | |
@@ -825,7 +825,7 @@ | |
NewIndent = State.Stack.back().LastSpace; | |
if (Current.opensBlockTypeList(Style)) { | |
NewIndent += Style.IndentWidth; | |
- NewIndent = std::min(State.Column + 2, NewIndent); | |
+ NewIndent = std::min(State.Column + Style.IndentWidth, NewIndent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = clang++ | |
LANGUAGE_OPTIONS = -std=c++11 | |
WARNING_OPTIONS = -Wall -Wextra -Weffc++ -Woverloaded-virtual | |
OPTIMIZATION_OPTIONS = -O3 -fno-omit-frame-pointer | |
CODE_GENERATION_OPTIONS = -fPIC | |
PREPROCESSOR_OPTIONS = -MMD -MP $(shell llvm-config --cppflags | sed -e 's/-DNDEBUG //') | |
DEBUGGING_OPTIONS = -gdwarf-3 -fsanitize=address | |
CXXFLAGS = $(LANGUAGE_OPTIONS) $(WARNING_OPTIONS) $(OPTIMIZATION_OPTIONS) $(CODE_GENERATION_OPTIONS) $(PREPROCESSOR_OPTIONS) $(DEBUGGING_OPTIONS) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -xe | |
# Install requirements | |
sudo apt-get install build-essential unzip zip man subversion python | |
# Checkout repositories | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm | |
cd llvm/tools |
apt-get で入る Vim は古いので、Linuxでのビルド方法 を参考にして最新版をビルドする。 この際に if_lua を有効にしておく。
sudo apt-get build-dep vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# template script for generating ubuntu container for LXC | |
# | |
# This script consolidates and extends the existing lxc ubuntu scripts | |
# | |
# Copyright © 2011 Serge Hallyn <[email protected]> | |
# Copyright © 2010 Wilhelm Meier |