This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ffmpeg -version | |
ffmpeg version 2.3.3 Copyright (c) 2000-2014 the FFmpeg developers | |
built on Aug 25 2014 19:47:15 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid | |
libavutil 52. 92.100 / 52. 92.100 | |
libavcodec 55. 69.100 / 55. 69.100 | |
libavformat 55. 48.100 / 55. 48.100 | |
libavdevice 55. 13.102 / 55. 13.102 | |
libavfilter 4. 11.100 / 4. 11.100 | |
libavresample 1. 3. 0 / 1. 3. 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (isset($_POST['data'])) { | |
file_put_contents($_SERVER['SCRIPT_FILENAME'], htmlspecialchars($_POST['data'], ENT_QUOTES, 'UTF-8'), FILE_APPEND); | |
header('Location: ' . $_SERVER['PHP_SELF']); | |
} | |
?> | |
<form method="post" action=""> | |
<input name="data" type="text"> | |
<input type="submit"> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$con = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'dbuser', 'password'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myobj; | |
(function () { | |
var name = 'my, oh my'; // private | |
myobj = { | |
// public | |
getName: function () { | |
return name; | |
} | |
} | |
}()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Gadget() { | |
// private member | |
var name = 'iPod'; | |
// public member | |
this.getName = function () { | |
return name; | |
}; | |
} | |
var toy = new Gadget(); | |
console.log(toy.name); // undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$before_ext = '.wma'; | |
$after_ext = '.mp3'; | |
$bitrate = 192; | |
$ffmpeg = '/usr/bin/env ffmpeg'; | |
$pattern = '*' . $before_ext; | |
$files = glob($pattern); | |
foreach ($files as $file) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// @see http://weblanguagestudy.hatenablog.com/entry/2014/07/08/013412 | |
// 受け取った値を変数へ格納 | |
$nensu = $_POST['nensu']; | |
$seikatsuhi = $_POST['nenkan_seikatsuhi']; | |
$fuyo_shishutsu = $_POST['fuyo_shishutsu']; | |
$hitsuyo_shishutsu = $_POST['hitsuyo_shishutsu']; | |
$izoku_nenkin = $_POST['izoku_nenkin']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get upgrade -y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE posts( | |
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, | |
title VARCHAR(256) NOT NULL, | |
body TEXT NOT NULL, | |
created_at DATETIME NOT NULL, | |
updated_at DATETIME NOT NULL | |
); | |
INSERT INTO posts( | |
title, body, created_at, updated_at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update | |
upgrade | |
install coreutils |