Skip to content

Instantly share code, notes, and snippets.

@nekojaxa
nekojaxa / ffmpeg_install.sh
Last active August 27, 2018 05:08
ffmpeg_install.sh
#!/bin/sh
sudo yum -y install autoconf automake cmake freetype-devel gcc gcc-c++ git libtool make mercurial nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
#Yasm
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
autoreconf -fiv
#
# AWS TOTAL Billing information
#
<source>
type cloudwatch
tag cloudwatch-billing.amount
cw_endpoint monitoring.us-east-1.amazonaws.com
namespace AWS/Billing
metric_name EstimatedCharges
@bitjockey42
bitjockey42 / 00_OSX_Docker_Machine_Setup.md
Last active November 9, 2020 13:49 — forked from andystanton/Start up local Docker Machine on OSX automatically.md
Use native virtualization on OS X docker with xhyve

What this?

So one of the painful points of using docker on OS X is that you need to run a virtualbox VM, which often suffers from performance issues. With xhyve, a OS X virtualization system, and docker-machine-xhyve you can now have docker use the native OS X hypervisor to run containers.

No more dealing with virtualbox shenanigans!

In this script, I've also set up a way to autoconfigure terminal sessions to load docker's environment vars (dependent on docker-machine) so you do not have to run eval $(docker-machine env whatever) every time you open a new terminal window.

Requirements

@ainame
ainame / matome.md
Last active October 4, 2017 08:16
井戸端iOS飯で過去に見た動画まとめ

井戸端iOS飯

とは?

井戸端iOS飯とは、昼休み1時間+MTG分の30分の計1時間30分を利用して、 NBFオフィスのコラボのプロジェクターとスクリーンを利用して、 最新のスマホアプリ開発技術に関する動画を見ながらご飯を食べて、 交流する場です。

ぜひお気軽にご参加ください。

FROM yoku0825/cent66:init
RUN echo "NETWORKING=yes" > /etc/sysconfig/network
RUN yum install -y which
RUN rpm -ivh http://packages.groonga.org/centos/groonga-release-1.1.0-1.noarch.rpm
RUN rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
RUN yum install -y mysql-community-mroonga groonga-tokenizer-mecab
RUN service mysqld start && mysql -e "GRANT ALL ON *.* TO root@'%' WITH GRANT OPTION"
EXPOSE 3306
@andystanton
andystanton / Start up local Docker Machine on OSX automatically.md
Last active April 3, 2024 00:50
Start up local Docker Machine on OSX automatically.

Notice

This script is no longer required with Docker for Mac which includes an option to run Docker at startup and doesn't use docker-machine to administer the local Docker engine.

Requirements

  • Docker Machine + Docker
  • curl
  • A Virtualbox-driven Docker Machine called "default" docker-machine create --driver virtualbox default (this is the default with Docker toolkit).
@vgeshel
vgeshel / function.js
Last active February 9, 2022 09:19
AWS Lambda function for forwarding SNS notifications to Slack
console.log('Loading function');
const https = require('https');
const url = require('url');
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration
const slack_url = 'https://hooks.slack.com/services/...';
const slack_req_opts = url.parse(slack_url);
slack_req_opts.method = 'POST';
slack_req_opts.headers = {'Content-Type': 'application/json'};
@onk
onk / .rubocop.yml
Last active January 15, 2018 02:30
僕の使っている .rubocop.yml
# rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました
# https://github.com/onk/onkcop
inherit_gem:
onkcop: "config/rubocop.yml"
@kamipo
kamipo / server_id
Created February 11, 2015 04:07
MySQLとか(Tokyo|Kyoto)ナントカのserver_idを計算するために使ってたコマンド
#!/usr/bin/perl -l
use strict;
use warnings;
$ENV{LANG} = "C";
$ENV{PATH} ||= "/usr/local/bin:/usr/bin/:/bin";
my $eth = shift || "eth0";
`ip addr list dev $eth|grep 'inet '` =~ m{\.(\d+?)\.(\d+?)\/};
@everpeace
everpeace / Why People Want Microservices.md
Last active November 8, 2022 10:37
マイクロサービス化が進む背景について考えてみた

マイクロサービス化が進む背景について考えてみた

最近マイクロサービスって流行ってますよね。バズってると言ってもいいくらい。

個人的には、「マイクロサービスって結局何なの?」とか、「SOAと何が違うわけ?」とかいう議論は苦手です。

でも「なんでみんなマイクロサービスで作りたいのか?なんでマイクロサービスで作られるサービスが多いのか?」にはすごく興味があるんです。

僕は今、シリコンバレーにある日系SIerの小さな子会社で駐在員をやっていますが、このエリアに居ると、とにかく最近、

「サービス全体が、独立した小さなサービスの集合で構成されるようになってきている」