Skip to content

Instantly share code, notes, and snippets.

@tsujimitsu
tsujimitsu / output-message-to-console.dart
Created March 4, 2023 06:24
Display message to console
void main() {
print('output message');
}
@tsujimitsu
tsujimitsu / read_outlook.py
Created December 13, 2015 02:43
read outlook express email from python
import win32com.client
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
inbox = outlook.GetDefaultFolder(6)
messages = inbox.Items
message = messages.GetLast()
# body_content = message.SenderEmailType
body_content = message.SenderEmailAddress
print body_content
@tsujimitsu
tsujimitsu / filedownload.py
Last active December 12, 2015 15:28
file download from web page
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
import urllib
import urllib2 as request
from bs4 import BeautifulSoup
def get_rpm_list(url):
response = request.urlopen(url)
@tsujimitsu
tsujimitsu / 01_abstract.md
Created December 2, 2012 01:57
Amazon Web Services (AWS)
@tsujimitsu
tsujimitsu / 01_abstract.md
Created November 22, 2012 15:27
elasticsearch
@tsujimitsu
tsujimitsu / 01_abstract.md
Last active March 7, 2016 05:04
Apache Solr

Create Local Repository

epel

Download rpm files

### Download Mirror Repository Files by wget
$ mkdir -p /usr/local/setup/local-repo/epel/6/x86_64/
$ cd /usr/local/setup/local-repo/epel/6/x86_64/
$ wget -r -np -nH -l 1 --timestamping -A .rpm -R "index.html?*" http://dl.fedoraproject.org/pub/epel/6/x86_64/
→ wgetで対象サイトからダウンロード(再帰的に、親ディレクトリは除外、ローカルディレクトリより新しいものを)
$ cd /usr/local/setup/local-repo/epel/6/

$ wget http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6

# Reference
*1 http://mo.kerosoft.com/0165
# TODO
- 再起動すると自動でDHCPでIPとってこれない
# Setting
$ chkconfig NetworkManager off
$ chkconfig network on
$ chkconfig --list | grep -i network