Skip to content

Instantly share code, notes, and snippets.

View issei-m's full-sized avatar
👮‍♀️
Guarding my own house 🏡

Issei.M issei-m

👮‍♀️
Guarding my own house 🏡
View GitHub Profile
@issei-m
issei-m / GlueApp.scala
Last active July 8, 2024 10:29
CloudWatch Logs + Spark で Rails ActiveJob の実行時間を集計
import com.amazonaws.services.glue.GlueContext
import com.amazonaws.services.glue.util.GlueArgParser
import com.amazonaws.services.glue.util.Job
import java.util.Calendar
import org.apache.spark.SparkContext
import org.apache.spark.sql.Dataset
import org.apache.spark.sql.Row
import org.apache.spark.sql.SaveMode
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.functions.from_json
<?php
declare(strict_types=1);
namespace Your\Own\Namespace;
use Doctrine\ORM\Internal\Hydration\IterableResult;
/**
* This is workaround for https://github.com/doctrine/doctrine2/issues/6480
@issei-m
issei-m / AppKernel.php
Last active August 29, 2015 14:09
Symfony 2.5 から 2.6 への移行 ref: http://qiita.com/issei-m/items/9b95134e02c38991c021
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
@issei-m
issei-m / keyremap4macbook-jis-eisuu-for-us-keyboard-private.xml
Last active December 24, 2015 07:29
KeyRemap4MacBookで、US配列の右Commandを「かな」、右Optionを「英数」にリマップするprivate.xml
<?xml version="1.0"?>
<root>
<item>
<name>KANA/EISUU for US keyboard</name>
<identifier>private.kana-eisuu-for-us-keyboard</identifier>
<autogen>
--KeyToKey--
KeyCode::COMMAND_R,
KeyCode::JIS_KANA
@issei-m
issei-m / sfPaypal.class.php
Last active December 17, 2015 09:48
https://github.com/issei-m/paypal-php を symfony 1.4 で使う為のクラス
<?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@issei-m
issei-m / capifony-deploy.rb
Last active December 12, 2015 09:39
The configuration to deploy the symfony2 application.
set :application, "example.com"
set :deploy_to, "/var/www/example.com"
set :domain, "example.com"
#logger.level = Logger::MAX_LEVEL
set :scm, :git
set :repository, "[email protected]:you/example.com.git"
server domain, :app, :web, :db, :primary => true
<?php
/**
* SQLSplitter class.
*
* @author Issei Murasawa <[email protected]>
* @version 1.0
* @license http://opensource.org/licenses/MIT The MIT License
* @see https://gist.github.com/4480253
*/
<?php
/**
* CommandExecutor - The executor of the shell command from web.
*
* @author Issei Murasawa <[email protected]>
* @version 1.0 beta
* @license http://opensource.org/licenses/MIT The MIT License
* @link https://gist.github.com/4480198
*/
<?php
/**
* Mercurial file-diff maker.
*
* @author Issei Murasawa <[email protected]>
* @version 0.0.3 beta
*/
$rev = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : die("Please specify revision in 1st argument.\n");
$source = isset($_SERVER['argv'][2]) ? preg_replace('@[\\\\/]$@', '', $_SERVER['argv'][2]) : dirname(__FILE__);
<?php
define('SAVE_PATH', 'c:\\users\\yourname\\dropbox');
$xamppPath = 'c:\\xampp';
run(array(
'c:\\windows\\system32\\drivers\\etc\\hosts',
$xamppPath . '/php/php.ini',
$xamppPath . '/mysql/bin/my.ini',