Skip to content

Instantly share code, notes, and snippets.

View yosmoc's full-sized avatar

Yoshihisa Mochihara yosmoc

  • IKEA IT AB
  • Sweden
View GitHub Profile
#!/bin/bash
set -euxo pipefail
GCC_PATH=/usr/local/gcc
sudo mkdir -p ${GCC_PATH}
wget -nv -O toolchain.tar.gz https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
sudo tar -jx -C ${GCC_PATH} --strip-components=1 -f toolchain.tar.gz
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: sample.api
# bashPath: /openapi101
swagger: "2.0"
info:
version: 1.0.0
title: Simple API
description: A simple API to learn how to write OpenAPI Specification
schemes:
- https
host: sample.api
# bashPath: /openapi101
const api_endpoint = 'http://petstore.swagger.io/v2/pet/';
function asyncfunc(uri, pet_id) {
let fetch = require('node-fetch');
return fetch(uri, {
method: 'GET',
headers: {'Content-Type': 'application/json'},
body: pet_id
})
}
#!/usr/bin/env python
def main():
for i in range(1, 101):
print(i)
if __name__ == '__main__':
main()
@yosmoc
yosmoc / .travis.yml
Last active February 8, 2016 21:16
Travis CI で複数環境でテストしたあとビルドプロセスは特定の環境で行いたい時のTips ref: http://qiita.com/samurai20000@github/items/fb47850cd8fbc4e46ee2
after_script:
- if [ "$TRAVIS_GO_VERSION" = "1.5.3" ] && [ "$BUILD_GOOS" = "linux" ] && [ "$TRAVIS_TAG" != "" ]; then go get github.com/inconshreveable/mousetrap; fi
package hello
import "fmt"
func Hello(user string) string {
hello := "hello " + user
fmt.Println(hello)
return hello
}
@yosmoc
yosmoc / change_commiter.sh
Created December 19, 2015 22:26
bulk change git user.name and user.email
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='samurai20000'; GIT_AUTHOR_EMAIL='samurai20000@gmail.com'; GIT_COMMITTER_NAME='samurai20000'; GIT_COMMITTER_EMAIL='samurai20000@gmail.com';" HEAD~10..HEAD
package main
import (
"fmt"
"time"
)
func main() {
done := make(chan bool)
package main
import (
"fmt"
"time"
)
func main() {
done := make(chan bool)