Skip to content

Instantly share code, notes, and snippets.

View yyoshiki41's full-sized avatar
📻

Yoshiki Nakagawa yyoshiki41

📻
View GitHub Profile
#!/bin/bash
output="./output.txt"
db="db_name"
user="root"
tables=$(mysql -uroot ${db} -e "SHOW TABLES;")
for table in ${tables}
do
if [ "${table}" == "Tables_in_dev_foo" ]; then
@yyoshiki41
yyoshiki41 / index.html
Created November 25, 2017 16:30
Open hls in safari
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Video Test</title>
</head>
<html>
<body>
<video width="480" height="270" preload="none" controls
src="">
@yyoshiki41
yyoshiki41 / slack.json
Created December 11, 2017 12:47
Karabiner-Elements complex modifications
{
"title": "slack",
"rules": [
{
"description": "cmd + n :Move next channel or DM in slack (unread if shift is pressed).",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "n",
#!/bin/bash
# depend on awscli and jq
export AWS_DEFAULT_REGION=ap-northeast-1
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
instanceName="nat-instance"
#!/bin/bash
set -e
# depend on awscli
export AWS_DEFAULT_REGION=ap-northeast-1
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_ACCESS_KEY=
tell application "iTunes"
activate
set newPreset to make new EQ preset
set name of newPreset to "Eargasm Explosion"
set band 1 of newPreset to 3
set band 2 of newPreset to 6
set band 3 of newPreset to 9.5
set band 4 of newPreset to 7.5
set band 5 of newPreset to 6
set band 6 of newPreset to 5.5
詳細はここ! foo
<details>
<summary>詳細はここ!</summary>
foo
</details>

direnv を使っていて下記のように、ライブラリのパスがoverwriteされている場合がある。

direnv: loading .envrc
direnv: export -DYLD_LIBRARY_PATH -LD_LIBRARY_PATH

e.g.)

エラー内容

@yyoshiki41
yyoshiki41 / ffmpeg-concat.md
Created January 20, 2019 11:47
ffmpeg concat
  1. concat.txt
# this is a comment
file '/path/to/one.mov'
file '/path/to/two.mov'
  1. Run command
@yyoshiki41
yyoshiki41 / CF-SignedURL.py
Created March 1, 2019 12:31
CloudFront SignedURL を発行する雑スクリプト
import time
from boto.cloudfront import CloudFrontConnection
from boto.cloudfront.distribution import Distribution
ACCESS_KEY_ID = ''
SECRET_ACCESS_KEY = ''
CLOUDFRONT_KEYPAIR_ID = ""
CLOUDFRONT_PRIVATE_KEY_FILE_LOCATION = "path/to/private.pem"