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
| #!/bin/sh | |
| # @see https://github.com/hatena/Git-for-Designers | |
| # @see http://blog.asial.co.jp/845 | |
| read -p "user name: " name | |
| git config --global user.name "`echo $name`" | |
| read -p "user email: " email | |
| git config --global user.email "`echo $email`" |
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 |
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
| 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
| <?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
| <?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
| 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
| 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
| $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
| <?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> |
OlderNewer