Skip to content

Instantly share code, notes, and snippets.

View KMR-zoar's full-sized avatar

Zoar KMR-zoar

  • Kawagoe, Japan
View GitHub Profile
function Push-Notification () {
$webhookuri = ""
$username = ""
$datetime = Get-Date -Format "yyyy/MM/dd-HH:mm:ss"
$text = @{ text = "$username $env:USERDOMAIN has task completed. $datetime"; link_names= 1}
$payload = ConvertTo-Json -InputObject $text
Invoke-RestMethod -Uri $webhookuri -Method Post -Body $payload > $null
}
require 'net/http'
require 'uri'
require 'json'
text = "Hello Slack!"
data = { "text" => text }
webhook_uri = "%Slack WebHooks URI%"
parsed_uri = URI.parse(webhook_uri)
res = Net::HTTP.post_form(
@KMR-zoar
KMR-zoar / boundary.geojson
Last active March 1, 2018 02:58
d3.js v4 + render polygon + render point + voronoi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KMR-zoar
KMR-zoar / index.html
Last active March 13, 2018 02:16
Mokuroku-Vector test
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>地理院タイル目録タイル</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<link rel="stylesheet" href="style.css" />
@KMR-zoar
KMR-zoar / images-update-for-docker.sh
Last active March 14, 2018 03:05
docker images Refresh
#!/bin/bash
docker images | grep latest | awk '{print $1}' | xargs -IXX docker pull XX
dangling=`docker images -f dangling=true -q | wc -l`
if [ $dangling != '0' ]
then
docker images -f dangling=true -q | xargs docker rmi
fi
@KMR-zoar
KMR-zoar / index.html
Created March 23, 2018 02:01
Vue.js 入門
<!DOCTYPE html>
<html lang="ja">
<head>
<!--
Vue.js 入門: http://www.tohoho-web.com/ex/vuejs.html
-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Vue Test</title>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TimeTable</title>
<link rel="stylesheet" href="tablestyle.css">
</head>
<body>
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[00;36m\]\w\[\033[00m\]\$ '
else
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/codemirror.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/codemirror.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.39.0/mode/markdown/markdown.min.js"></script>
@KMR-zoar
KMR-zoar / bookmarklet.js
Created September 28, 2018 07:49
Open changeset on the chageset-map from osmlab
javascript:(function(){if(location.hostname==='www.openstreetmap.org'&&location.pathname.slice(1,10)==='changeset'){window.open('https://osmlab.github.io/changeset-map/#'+location.pathname.slice(location.pathname.lastIndexOf('/')+1));void(0)}else{window.alert('It is not OSM changeset URL')}})();