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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(){ | |
int width, height, level; | |
int x,y; // X軸、Y軸 | |
int i; | |
char s[10]; // ヘッダのファイル形式を格納 | |
char nl[2]; // 改行記号を格納 | |
unsigned char *data; // 画像データ |
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
import commands | |
for i in range(216): | |
arg = [] | |
num = commands.getoutput("ls "+"{0:03d}".format(i+1)+"-*|wc -l") | |
if (num[0]=='l'): continue | |
for j in range(int(num)): | |
arg.append("{0:03d}".format(i+1)+"-"+str((j+1))+".ts") | |
args = "concat:"+"|".join(arg) | |
print "ffmpeg -i \"" +args + "\" -c copy -y \"" + "{0:03d}".format(i+1) + ".ts\"" |
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
#coding: utf-8 | |
#!/usr/bin/env python2 | |
import re | |
import requests | |
import lxml.html | |
import urllib | |
from selenium import webdriver | |
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities |
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
#coding: utf-8 | |
""" | |
requirement: | |
ffmpeg | |
usage example: | |
$ ls *.mp3 | python mp32wav.py | |
input: test.mp3 |
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
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import re | |
import requests | |
import lxml.html | |
from selenium import webdriver | |
class oregairu_hook(object): | |
def __init__(self): |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
#include <unistd.h> | |
static int *p = NULL; | |
static void execute_command(){ | |
char *argv[] = {"/bin/sh", "-c", "'date'", NULL}; | |
execve(argv[0], argv, NULL); |
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 | |
#ref: http://orebibou.com/2014/01/esxi%E4%B8%8A%E3%81%AE%E4%BB%AE%E6%83%B3%E3%83%9E%E3%82%B7%E3%83%B3nic%E3%81%AEmac%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E4%B8%80%E6%8B%AC%E5%8F%96%E5%BE%97%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88/ | |
#Get VM List | |
VimCmdList=`vim-cmd vmsvc/getallvms | grep "vmx-" | grep ".vmx" | awk '{print $2,$3,$4}'` | |
IFS=$'\n' | |
cat /dev/null > tmp.list | |
cat /dev/null > 1-6.list | |
for i in $VimCmdList; do | |
#Get VM Name | |
VMName=`echo "$i" | awk '{print $1}'` |
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
################################## | |
# Create Virtual Distributed PortGroup | |
# VLAN 20 - 160 | |
20..160 | foreach { | |
Get-VDSwitch -Name "test" | New-VDPortgroup -Name ("VLAN{0:0}" -F $_) -NumPorts 15 -VLanId $_ | |
} | |
# Create VM from Template | |
1...15 | foreach { | |
New-VM -Name ("T{0:0}mori_common" -F $_) -Datastore 'datastore1' -Template common-Template -ResourcePool Resources -DiskStorageFormat thin |
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 | |
#csvfile=vlan-list.csv | |
# s -> source csv file | |
# n -> name of vswitch | |
# TODO: option is required | |
# $ ./mkpg.sh -s vlan-list.csv -n vswitch1 | |
while getopts s:n: OPT |
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
/\_/\ | |
| | | |
|・ ・ | | |
| | | |
〄 ⊂⊃ ノ | |
` _ ’ |