npm install -g node-notifier-cli
alias notifycmd='notify --timeout false -m "done: $?"'
<any command> ; notifycmd
| import isoweek | |
| import datetime | |
| import matplotlib.pyplot as plt | |
| from github import Github | |
| from operator import add | |
| g = Github("{user}", "{password}") | |
| # For GitHub Enterprise | |
| # g = Github(base_url="https://{hostname}/api/v3", login_or_token="{access_token}") |
| public static class FtpUtil | |
| { | |
| /// <returns>exists, ok, error message</returns> | |
| public static (bool, bool, string) FileExists(string ftpUrl, string fileName, string user, string password) | |
| { | |
| WebRequest request = WebRequest.Create(ftpUrl); | |
| request.Credentials = new NetworkCredential(user, password); | |
| request.Method = WebRequestMethods.Ftp.ListDirectory; | |
| try |
| # coding: utf-8 | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| from selenium.webdriver.common.keys import Keys | |
| import requests | |
| import json | |
| import os | |
| import time | |
| BASEDIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), "screenshots/") |
See: openresty/lua-nginx-module#436
/usr/local/openresty/luajit/bin/luajit-<hoge> -bl foo.lua > /dev/null
神〜〜
| pct create <id> /var/lib/vz/template/cache/centos-7-default_20170504_amd64.tar.xz \ | |
| -arch amd64 \ | |
| -ostype <centos|ubuntu|etc> \ | |
| -hostname <hostname> \ | |
| -cores <cores> \ | |
| -memory <memory(MB)> \ | |
| -swap <swap(MB)> \ | |
| -storage local-lvm \ | |
| -password \ | |
| -net0 name=eth0,bridge=<bridge>,gw=<gateway>,ip=<cidr>,type=veth &&\ |
| void setup() { | |
| pinMode(1, OUTPUT); | |
| pinMode(9, OUTPUT); | |
| pinMode(A0, INPUT); | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| int inputValue = analogRead(A0); |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| import glob | |
| import time | |
| start = time.time() | |
| file_name = [] | |
| first = [] | |
| other = [] |