Skip to content

Instantly share code, notes, and snippets.

View ohoroyoi's full-sized avatar
🏃‍♀️
keep going

ohoroyoi

🏃‍♀️
keep going
View GitHub Profile
@ohoroyoi
ohoroyoi / this_is_promise_arr.js
Created July 13, 2019 16:01
Promise.all 예시
const getTodos = (id) => {
return new Promise((resolve, reject) => {
$.getJSON(`https://jsonplaceholder.typicode.com/todos/${id}`, (data) => {
resolve(data);
console.log(data);
});
});
}
Promise.all([
import requests
from lxml import etree
import wikipedia
import csv
import wikipediaapi
wiki_en = wikipediaapi.Wikipedia('en')
wiki_en = wikipediaapi.Wikipedia(
language='en',
extract_format=wikipediaapi.ExtractFormat.WIKI
@ohoroyoi
ohoroyoi / leaflet_tutorial.html
Created August 27, 2019 08:25
leaflet save to db and retrieve from db
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Leaflet tutorial</title>
</head>
<body>
<script
src="https://code.jquery.com/jquery-2.2.4.js"
@ohoroyoi
ohoroyoi / leaflet_marker.html
Created August 28, 2019 09:15
leaflet 클릭하면 마커에 포커싱하게 하는것 (과정)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Leaflet tutorial</title>
</head>
<body>
<script
src="https://code.jquery.com/jquery-2.2.4.js"
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,
@ohoroyoi
ohoroyoi / etc_logstash_conf.d_current-logstash.conf
Created July 16, 2020 06:14
logstash : input 3 pg table, output 4 es indexes
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://IP:PORT/DB_NAME?useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
jdbc_user => "atlas"
jdbc_passwor => "atlaspw"
jdbc_validate_connection => true
jdbc_driver_library => "DRIVER_PATH"
jdbc_driver_class => "org.postgresql.Driver"
schedule => "* * * * *"
statement => "SELECT region_id, region_type, country_code, country_code3, continent_code, source_from,