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 | |
class Rippotai { | |
private $tate; | |
private $yoko; | |
private $takasa; | |
public function __construct($tate,$yoko,$takasa){ | |
$this->tate = $tate; |
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
var payment_type = <?php json_encode(array('hogehoge'=>array('payment'=>'金額'))); ?>; | |
$('select[name="product_name"]').on('change',function(){ | |
change_tax(); | |
$('#price').val(get_price()).change(); | |
}); | |
var get_tax = function(){ | |
return $('input[name=taxation]:checked').val() == 0?0:0.08; | |
} | |
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
history | grep hogehoge | awk 'BEGIN{ORS=""}{a=split($0,array,",");for(i=2;i<a;i++){print array[i] ","} print array[i] "\n"}' |
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
#!/usr/bin/perl | |
binmode STDOUT,":utf8"; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Copy; | |
my $class_name = $ARGV[0]; |
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
#!/usr/bin/perl | |
binmode STDOUT,":utf8"; | |
use strict; | |
use warnings; | |
use utf8; | |
use File::Copy; | |
my $file = $ARGV[0]; |
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
# coding:utf-8 | |
import urllib | |
import urllib2 | |
import json | |
import sys | |
args = sys.argv | |
argc = len(args) | |
if (argc != 3): | |
print 'Usage: arg is url and filename' |
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
(defun php-cs-fixer () | |
(interactive) | |
(setq filename (buffer-file-name (current-buffer))) | |
(call-process "php-cs-fixer" nil nil nil "fix" filename ) | |
(revert-buffer t t) | |
) |
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
def generate(len): | |
bin = ("1"* len) + ("0"* (32 - len)) | |
return '.'.join(map(str,[ int(bin[i:i+8],2) for i in range(0,32,8)])) | |
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
my $example = "<a href='http://example.com'>example</a>"; | |
$example =~ s/<[a-zA-Z'"=:\/\. ]*>//g; | |
print $example; |
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
plain_a = ['fizz'] | |
plain_b = plane_a | |
plain_a << 'buzz' | |
p plain_a | |
#["fizz", "buzz"] | |
p plain_b |