This file contains 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
var labels = PropertiesService.getScriptProperties().getProperty('GMAIL_ARCHIVE_LABELS'); | |
function mail_to_archive() { | |
var labellist = labels.split(','); | |
labellist.forEach( | |
function to_archive(value) { | |
if (value) { | |
var label = GmailApp.getUserLabelByName(value); | |
if (label == null) { | |
GmailApp.createLabel(value); |
This file contains 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
apt-get update | |
apt-get install -y libcurl3 opensc | |
curl https://developers.yubico.com/YubiHSM2/Releases/yubihsm2-sdk-1.0.1-ubuntu1604-amd64.tar.gz | tar zx -C ./ | |
dpkg -i yubihsm2-sdk/libyubihsm1_1.0.1-1_amd64.deb | |
dpkg -i yubihsm2-sdk/libyubihsm-dev_1.0.1-1_amd64.deb | |
dpkg -i yubihsm2-sdk/yubihsm-connector_1.0.1-1_amd64.deb | |
dpkg -i yubihsm2-sdk/yubihsm-shell_1.0.1-1_amd64.deb | |
dpkg -i yubihsm2-sdk/yhwrap_1.0.1-1_amd64.deb | |
dpkg -i yubihsm2-sdk/yubihsm-pkcs11_1.0.1-1_amd64.deb |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<servicing/> | |
<settings pass="windowsPE"> | |
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
<DiskConfiguration> | |
<Disk wcm:action="add"> | |
<CreatePartitions> | |
<CreatePartition wcm:action="add"> | |
<Order>1</Order> |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<servicing/> | |
<settings pass="windowsPE"> | |
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> | |
<DiskConfiguration> | |
<Disk wcm:action="add"> | |
<CreatePartitions> | |
<CreatePartition wcm:action="add"> | |
<Order>1</Order> |
This file contains 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
# The MIT License (MIT) | |
# Copyright (c) 2018 [email protected] | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains 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 os | |
from mkdocs.config.base import load_config | |
""" | |
mkdocs.yml から存在しないページを作成するヘルパー関数です。 | |
usages: | |
> python make_pages.py | |
or |
This file contains 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
const base64url = require("base64url") | |
const cbor = require('cbor') | |
const crypto = require('crypto') | |
const jsrsasign = require('jsrsasign') | |
//sample attestation ;) | |
const attestationResponse = { | |
"attestationObject": "o2NmbXRxYW5kcm9pZC1zYWZldHluZXRnYXR0U3RtdKJjdmVyaDE0MzY2MDE5aHJlc3BvbnNlWRS9ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbmcxWXlJNld5Sk5TVWxHYTJwRFEwSkljV2RCZDBsQ1FXZEpVVkpZY205T01GcFBaRkpyUWtGQlFVRkJRVkIxYm5wQlRrSm5hM0ZvYTJsSE9YY3dRa0ZSYzBaQlJFSkRUVkZ6ZDBOUldVUldVVkZIUlhkS1ZsVjZSV1ZOUW5kSFFURlZSVU5vVFZaU01qbDJXako0YkVsR1VubGtXRTR3U1VaT2JHTnVXbkJaTWxaNlRWSk5kMFZSV1VSV1VWRkVSWGR3U0ZaR1RXZFJNRVZuVFZVNGVFMUNORmhFVkVVMFRWUkJlRTFFUVROTlZHc3dUbFp2V0VSVVJUVk5WRUYzVDFSQk0wMVVhekJPVm05M1lrUkZURTFCYTBkQk1WVkZRbWhOUTFaV1RYaEZla0ZTUW1kT1ZrSkJaMVJEYTA1b1lrZHNiV0l6U25WaFYwVjRSbXBCVlVKblRsWkNRV05VUkZVeGRtUlhOVEJaVjJ4MVNVWmFjRnBZWTNoRmVrRlNRbWRPVmtKQmIxUkRhMlIyWWpKa2MxcFRRazFVUlUxNFIzcEJXa0puVGxaQ1FVMVVSVzFHTUdSSFZucGtRelZvWW0xU2VXSXliR3RNYlU1MllsUkRRMEZUU1hkRVVWbEtTMjlhU1doMlkwNUJVVVZDUWxGQlJHZG5SVkJCUkVORFFWRnZRMmRuUlVKQl |
This file contains 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
#!/usr/bin/env python | |
''' | |
put this file to "/etc/mackerel-agent/check-gitlab-version.py" | |
and add /etc/mackerel-agent/mackerel-agent.conf | |
if env not set, hostname is got from hostname command | |
[plugin.checks.gitlab_version] | |
command = "python /etc/mackerel-agent/check-gitlab-version.py" | |
env = { HOST = "https://your.gitlab.host" } |
This file contains 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
# String To Base64 | |
function Encode-Base64 { | |
[OutputType([String])] | |
param( | |
[Parameter(Mandatory=$True, ValueFromPipeline=$True)] | |
[String]$plainText | |
) | |
process { | |
$byte = ([System.Text.Encoding]::Default).GetBytes($plainText) | |
$b64enc = [Convert]::ToBase64String($byte) |
This file contains 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
# iex (New-Object System.Net.WebClient).downloadString("https://gist.githubusercontent.com/watahani/c54377a3b84fe965b439583e845f9766/raw/278e68045b487e0f85adb30740278074ba2a44fd/Setup-AzureVM.ps1") | |
# [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
# Set-ExecutionPolicy RemoteSigned | |
$runReg = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" | |
$runRegKeyName = "azureVMSetup" | |
function Disable-Services { |
OlderNewer