This file contains 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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\Redis; | |
class MigrateSessionToRedisFromFile extends Command | |
{ | |
/** |
This file contains 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
redis-cli bgsave |
This file contains 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 user set email = replace(email, left(email, instr(email, '@')-1),concat('xxxxxxx_', id)); |
This file contains 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
# opens a PR from the current branch | |
function opr() { | |
parentBranch=$1 | |
currentBranch=`git branch | grep "*"` | |
repoName=$(git remote show origin -n | ruby -ne 'puts /^\s*Fetch.*:(.*).git/.match($_)[1] rescue nil') | |
open -a /Applications/Google\ Chrome.app https://github.com/${repoName/* /}/compare/${parentBranch/* /}...${br/* /} | |
} |
This file contains 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
0 3 * * * cd /path_to_your_git_root_directory; git add -A; git commit -m "Daily backup"; git push origin master; |
This file contains 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
// 同じ名前のメソッドが存在しないかチェック | |
if (! Collection::hasMacro('transpose')) { | |
/* | |
* Transpose an array. | |
* | |
* @return \Illuminate\Support\Collection | |
*/ | |
Collection::macro('transpose', function () { | |
$items = array_map(function (...$items) { | |
return $items; |
This file contains 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
public class Move : MonoBehaviour { | |
public GameObject target; | |
void Start () { | |
NavMeshAgent agent = GetComponent<NavMeshAgent> (); | |
agent.speed = 1;//このようにスクリプトからNavMeshのプロパティをいじれる。 | |
agent.destination = target.transform.position; | |
} | |
} |
This file contains 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 | |
namespace App\Jobs; | |
use App\Models\Channel; | |
use File; | |
use Storage; | |
use Illuminate\Bus\Queueable; | |
use Illuminate\Queue\SerializesModels; |