Skip to content

Instantly share code, notes, and snippets.

@Burning-Chai
Burning-Chai / file0.txt
Last active August 16, 2017 09:41
VIRTUALBOX から VAGARNT の BOX 作成 ref: http://qiita.com/Burning-Chai/items/8299ff70f44b3b54cf64
# sed -i -e "s:^ONBOOT=no$:ONBOOT=yes:" /etc/sysconfig/network-scripts/ifcfg-eth0
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 | grep ONBOOT
# service network restart
# ip addr show eth0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
app.run('0.0.0.0', debug=True, ssl_context=(
'<server.keyのディレクトリ>/server.crt',
'<server.keyのディレクトリ>/server.key'
))
[
{
"code": 1,
"ja": "北海道",
"en": "Hokkaido"
},
{
"code": 2,
"ja": "青森県",
"en": "Aomori"
#!/usr/bin/python
# -*- coding: utf-8 -*-
import json
import redis
import time
client = redis.StrictRedis(
host='IPアドレス',
port=6379,
package main
import (
"fmt"
"net/http"
"encoding/json"
)
type Student struct {
Id int
-- omission --
var Button = require('react-native-button');
var moment = require('moment');
var React = require('react-native');
-- omission --
var AwesomeProject = React.createClass({
-- omission --
var request = require('superagent');
var React = require('react-native');
-- omission --
var AwesomeProject = React.createClass({
render: function() {
@Burning-Chai
Burning-Chai / InstallPostgres9.6onCentOS7.md
Created May 28, 2016 06:57
How to install Postgres on CentOS7
$ wget https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-1.noarch.rpm
$ sudo rpm -ihv pgdg-redhat96-9.6-1.noarch.rpm
$ sudo yum -y install postgresql96-server postgresql96-devel postgresql96-contrib
$ sudo systemctl start postgresql-9.6
$ sudo systemctl status postgresql-9.6
$ sudo /usr/pgsql-9.6/bin/postgresql96-setup initdb
$ sudo systemctl enable postgresql-9.6
$ sudo systemctl start postgresql-9.6
$ sudo su - postgres -c 'psql'

postgres=# create database <database name>;
postgres=# create user <user name> password '<password>';
postgres=# alter database <database name> owner to <user name>;