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 pymongo | |
import json | |
import pandas as pd | |
from bson.json_util import dumps | |
def get_co(): | |
client = pymongo.MongoClient(hostname, port) # hostname & port | |
db = client.dbname # db name | |
collection = db.collection_name # collection name | |
return collection |
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
# This code is taken from these blog. | |
# https://www.shiftedup.com/2014/11/13/how-to-bulk-remove-files-from-slack | |
# http://qiita.com/sotayamashita/items/cb811f512162e61f56f4 | |
# | |
# And I am changing the implementation a little. | |
# (It got to get arguments, and modify for Python 3) | |
import requests | |
import json | |
import calendar |
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 -*- | |
from bs4 import BeautifulSoup | |
import collections as cl | |
import json | |
""" | |
The export data is converted into json file of this structure. | |
/////////////// | |
{ |
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 Vue from 'vue' | |
import Vuex from 'vuex' | |
Vue.use(Vuex) | |
const incrementPlugin = store => { | |
store.subscribe((mutation, state) => { | |
if(mutation.type === "showCount") { | |
state.count++ | |
} |
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
// stdin sample at Node.js | |
var lines = [] | |
var rl = require('readline').createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}) | |
rl.on('line', ((line) => { | |
lines.push(line) |
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 | |
# reference : https://gist.github.com/twinbird/9cb8979e163e89ae6a88fd650291fd12 | |
if [ $# != 1 ]; then | |
echo "Usage: $0 [binary name]" | |
exit 0 | |
fi | |
fpath=$1 | |
fname_ext="${fpath##*/}" |
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
version: '3.7' | |
services: | |
wordpress: | |
image: wordpress | |
restart: always | |
container_name: 'app-conatiner-name' | |
ports: | |
- 8080:80 |
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
do shell script "open -a Google\\ Chrome {URL}" |
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
######################################################## | |
# This environment is already install "git" and "vim" | |
######################################################## | |
# clean & update | |
apt-get autoclean | |
apt-get update | |
# Install curl | |
apt-get install -y curl |
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
# if not pulled docker container | |
# docker pull clojure | |
docker run -it --rm --name repl-clujure clojure /bin/bash | |
# start repl at docker container | |
lein repl |