Skip to content

Instantly share code, notes, and snippets.

View hikarivina's full-sized avatar

Hikarivina hikarivina

  • Tokyo
View GitHub Profile
@akira345
akira345 / rds_log_download.py
Last active April 3, 2020 11:25
Python勉強がてら作成した、RDSのログファイルを一括ダウンロードするスクリプトです。日付ごとにディレクトリを作成して格納します。
# Import the SDK
import boto3
import datetime
import os
rds = boto3.client('rds', region_name='us-east-1')
db_instance_identifier = "mysql-db"
log_base_path = "./log/"
@shichi-at-nttr
shichi-at-nttr / _SonarQube-on-Docker.md
Last active May 22, 2024 11:49
SonarQube on Docker (データを永続化して使う)

静的コード解析ツールSonarQubeをDockerで動かす

Dockerを終了しても解析結果とSonarQubeのプラグイン情報を保持するためのdocker-compose

SonarQubeの起動

docker-compose.yml を置いたディレクトリで以下を実行する。

$ docker-compose up -d

Lua言語入門

Hello World

コードを書く

print("hello World!!\")

拡張子は.lua としてファイルを保存

@jochenschoellig
jochenschoellig / ChatCollectionViewFlowLayout.swift
Created January 19, 2017 15:49
A subclass of UICollectionViewFlowLayout to get chat behavior without turning collection view upside-down. This layout is written in Swift 3 and absolutely usable with RxSwift and RxDataSources because UI is completely separated from any logic or binding.
import UIKit
class ChatCollectionViewFlowLayout: UICollectionViewFlowLayout {
private var topMostVisibleItem = Int.max
private var bottomMostVisibleItem = -Int.max
private var offset: CGFloat = 0.0
private var visibleAttributes: [UICollectionViewLayoutAttributes]?
@jweinst1
jweinst1 / advenums.swift
Created July 12, 2016 06:32
using advanced applications of enums in swift
//playground for experimenting with enums
enum pair {
case First(Int)
case Second(Int)
//add to the first case
mutating func addToFirst(amount:Int) {
switch(self){
case .First(let current):
self = .First(current + amount)
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@voluntas
voluntas / webrtc.rst
Last active January 13, 2025 22:40
WebRTC の未来
@chrismdp
chrismdp / s3.sh
Last active January 23, 2025 09:26
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う