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 | |
use Illuminate\Queue\Jobs\Job; | |
use Aws\S3\S3Client; | |
use Aws\DynamoDb\DynamoDbClient; | |
use Aws\DynamoDb\Model\BatchRequest\WriteRequestBatch; | |
use Aws\DynamoDb\Model\BatchRequest\PutRequest; | |
use Aws\DynamoDb\Enum\Type; | |
use Illuminate\Support\Facdes\Log; | |
class IdmappingID { |
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
{ | |
"Reservations": [ | |
{ | |
"OwnerId": "XXXXXXXXXXXX", | |
"ReservationId": "r-XXXXXXXX", | |
"Groups": [], | |
"Instances": [ | |
{ | |
"Monitoring": { | |
"State": "disabled" |
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 | |
dir=/home/ec2-user/tmp | |
filepath=$dir/testfile.csv | |
Err(){ echo "$1">&2; exit 1; } | |
mail_to='[email protected]' | |
mime=`file --mime $filepath | cut -d' ' -f2` |
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 () { | |
var appPrefix = {}; | |
appPrefix.app = function () { | |
function _init() { | |
// ここに何か書く。 | |
console.log("hogehoge start"); | |
} | |
return { |
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 | |
// ControllerとかCommandとかのなかに適当に以下を書く | |
$image = Image::findOrFail($ad->image_id); | |
$content_type = explode(";",$image->spec)[0]; | |
$spec_ext = explode("/", $content_type)[1]; | |
$ad_array = $ad->toArray(); | |
$display_text = "あああ表示文字"; |
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 | |
// from http://mypacecreator.net/blog/archives/2021 | |
//以下3行の項目を任意に変更 | |
$display_posts_count = 10; //実際に表示したい記事件数 | |
$get_posts_count = 20; //取得する記事件数(PR記事を含むので$display_posts_countより少し多めに設定) | |
$feed = fetch_feed('http://rssblog.ameba.jp/conboy/rss20.xml'); //取得したいRSS | |
//以下は必要なければ変更しなくてOK | |
$counter = 0; //ループ回数カウンター | |
include_once(ABSPATH . WPINC . '/feed.php'); |
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 | |
LOCAL_JOB_HOME=/home/myname/downloader | |
REMOTE_JOB_HOME=/data/downloader/job | |
ls -1 $LOCAL_JOB_HOME/wait | sort -n > $LOCAL_JOB_HOME/wait_local | |
ssh myname@remotehost ls $REMOTE_JOB_HOME/wait | sort -n > $LOCAL_JOB_HOME/wait_remote | |
remote=`comm -3 $LOCAL_JOB_HOME/wait_remote $LOCAL_JOB_HOME/wait_local | awk -F"\t" '{print $1}' | grep "[0-9]"` |
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 | |
/** | |
* Created by JetBrains PhpStorm. | |
* User: ishimaru | |
* Date: 2013/07/05 | |
* Time: 17:31 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
require 'vendor/autoload.php'; |
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
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You | |
# may not use this file except in compliance with the License. A copy of | |
# the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# or in the "license" file accompanying this file. This file is | |
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
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 | |
// app/libraries/li3_server/config/router.php | |
// app/libraries/li3_server においたとき… | |
$webroot = dirname(dirname(dirname(__DIR__))).'/webroot/'; | |
if (file_exists($webroot . $_SERVER['REQUEST_URI'])) { | |
return false; | |
} else { | |
include_once $webroot.'/index.php'; | |
} |