$ brew update
$ brew install ansible
$ vagrant box list
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- name: add a new user | |
user: name=ishikawa | |
- name: install libselinux-python | |
yum: name=libselinux-python state=latest | |
- name: insall vim | |
yum: name=vim state=latest |
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title></title> | |
</head> | |
<body> | |
<script> | |
/** |
function() { | |
return !this.isLocal && createStandardXHR() || createActiveXHR(); | |
} | |
var t = true; | |
function aa() { return !t && 23 || 77 }; | |
aa(); //77 | |
t = false; | |
aa(); //23 |
function prefixToArray($prefix, $arr) { | |
$prepend = function($val) use ($prefix) { | |
return $prefix . $val; | |
}; | |
return array_map($prepend, $arr); | |
} | |
$testArray = | |
array("A" => "test", |
# -*- coding:utf-8 -*- | |
import sys | |
def process_file(filename): | |
'''csvファイルをオープンし、読み出してSQLのUPDATE文を出力します''' | |
input_file = open(filename, "r") | |
header = input_file.readline().strip().split(',') | |
buffer = '' | |
for line in input_file: |
# カレントディレクトリ以下のphpファイルのstep数をカウントする | |
find . -type f | grep .php | xargs wc -l |
#include <stdio.h> | |
#include <unistd.h> | |
int main(int argc, const char* argv[]) { | |
printf("Running ps with execlp\n"); | |
execlp("ps", "ps", "-ax", 0); | |
printf("Done. \n"); | |
exit(0); | |
} |