Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
usage() {
cat <<EOF
${0} <directory> <output>
EOF
}
#!/bin/bash
#set -e
FFMPEG=$(which ffmpeg)
#CODEC=libvpx
CODEC=libx264
PRESET=ultrafast
#ACODEC=libvorbis # for webm
#PRESET=fast
#!/bin/bash
#set -e
FFMPEG=$(which ffmpeg)
#CODEC=libvpx
CODEC=libx264
PRESET=ultrafast
#ACODEC=libvorbis # for webm
#PRESET=fast
create database {{ database_name }};
create user '{{ user_name }}'@'{{ host }}' identified by '{{ password }}';
grant all privileges on `{{ database_name }}`.* to '{{ user_name }}'@'{{ host }}';
flush privileges;
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import os, sys, json
import argparse
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from sqlalchemy.schema import Table
from sqlalchemy.schema import MetaData
#!/usr/bin/env python
#-*- coding: utf-8 -*-
from __future__ import print_function
import os, sys, sqlite3
import argparse
DEFAULT_DATABASE_NAME = '.' + os.path.basename(__file__) + '.db'
DEFAULT_DATABASE_PATH = os.path.join(os.environ.get('HOME'), DEFAULT_DATABASE_NAME)
query_option = {'tablename': 'junmakii_command_line_logger_items'}
/*global window, document */
var DrawAdsense;
DrawAdsense = function () {};
DrawAdsense.delay = 3000;
DrawAdsense.elName = 'adsense-area';
DrawAdsense.code = '変更されました。';
import string
def get_sequence_of_numbers_with_common_difference(m, n, seq=' '):
a = []
i = m
a.append(i)
while len(a) < 10:
i = i + n
def get_sequence_of_numbers_with_common_difference(m, n, seq=' '):
a = []
i = m
a.append(i)
while len(a) < 10:
i = i + n
a.append(i)
#!/bin/bash
set -e
if [[ $# -lt 2 ]]; then
echo "${0} <file_dir> <output>"
fi
ffmpeg -f concat -i <(for f in $1/*; do echo "file '$PWD/$f'"; done) -c copy $2