Skip to content

Instantly share code, notes, and snippets.

View takeyuweb's full-sized avatar

Yuichi Takeuchi takeyuweb

View GitHub Profile
@kokuyouwind
kokuyouwind / run_task
Last active May 7, 2021 04:09
ECSで任意タスクを実行するスクリプト(クラスタとタスク定義名が揃っている前提、subnet, securityGroupは適切なものに書き換えてください)
#!/bin/bash -e
# ECS環境でコマンドを実行するためのタスク
#
# 以下の設定が事前に必要
# * aws-cliのインストール
# * ecs-cliのインストール
# * jqのインストール
#
# usage: run_task env command...
@voluntas
voluntas / webrtc.rst
Last active January 13, 2025 22:40
WebRTC の未来
@ifraixedes
ifraixedes / LICENSE
Last active May 6, 2018 06:44
AWS lambda handler which download images from S3, resizes them and upload the new ones to S3; tested with mocha, chai, sinon and proxyquire
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
(http://www.wtfpl.net/about/)
Copyright (C) 2015 Mario Mendes (@hyprstack)
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@maxwell
maxwell / rspec
Last active April 21, 2016 00:16
Fix using spring from command line and RubyMine
#got this error in your Rubymine Test runner, and have to "spring stop" all the time?
#/Users/maxwell/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- teamcity/spec/runner/formatter/teamcity/formatter (LoadError)
#!/usr/bin/env ruby
begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
require 'bundler/setup'
@kakutani
kakutani / Annotation.md
Last active September 26, 2019 13:35 — forked from ursm/Gemfile
Raw Gemfile on Idobata (master - 5adeddb)

Idobata Gemfile プレゼント

tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile

プレゼントについてのお詫び

rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)

<?php
define( 'DataAPICacheDir', '/tmp/api_cache' );
define( 'DataAPIUploadCacheDir', '/tmp/upload' );
define( 'DataAPICacheTtl', 1200 );
define( 'DataAPICacheWithAuth', TRUE );
define( 'DataAPIURL', 'http://localhost/mt/mt-data-api.cgi' );
define( 'SendHTTPHeaderMethod', '' );
$cache_ttl = DataAPICacheTtl;
$cache_with_auth = DataAPICacheWithAuth;
$cache_dir = DataAPICacheDir;
@rafaelbiriba
rafaelbiriba / install_ffmpeg_libfdkaac.sh
Last active January 4, 2026 01:06
Install FFmpeg with libfdk_aac support (For Ubuntu)
# Criando um script .sh para executar todos os comandos:
#root@servidor:~# vi script.sh
#root@servidor:~# chmod +x script.sh
#root@servidor:~# ./script.sh
apt-get update
apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git
@eqhmcow
eqhmcow / unzip.pl
Last active December 31, 2022 18:49
Perl unzip example with IO::Uncompress::Unzip
#!/usr/bin/perl
# example perl code, but this should now actually work properly, even on
# Windows
# thanks to everyone who tested this, reported bugs and suggested or
# implemented fixes!
# this code is licensed under GPL 2 and/or Artistic license;
# aka free perl software
@hayajo
hayajo / changelog_en.md
Last active April 1, 2025 14:37
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@thomseddon
thomseddon / gist:3511330
Last active September 8, 2025 14:36
AngularJS byte format filter
app.filter('bytes', function() {
return function(bytes, precision) {
if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-';
if (typeof precision === 'undefined') precision = 1;
var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'],
number = Math.floor(Math.log(bytes) / Math.log(1024));
return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number];
}
});