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/bash -l | |
set -Ceu | |
ids=`az functionapp list --query '[].id' -o tsv` | |
for id in $ids; do | |
read rg name <<< $(echo $id | awk -F '/' '{print $5, $9}') | |
storage=$(az functionapp config appsettings list -g $rg -n $name --query "[?name == 'AzureWebJobsStorage'].value" -o tsv | awk -F ';' '{for(i = 1; i <= NF; i++){printf $i "\n"}}' | grep AccountName | awk -F '=' '{print $2}') | |
echo $rg, $name, $storage | |
done |
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
# export myRG=<resource group> | |
# export myFunctionApp=<function app> | |
az functionapp config appsettings list -g $myRG -n $myFunctionApp --query "[?name == 'AzureWebJobsStorage'].value" -o tsv | awk -F ';' '{for(i = 1; i <= NF; i++){printf $i "\n"}}' | grep AccountName | awk -F '=' '{print $2}' |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.638.0.min.js"></script> | |
</head> | |
<body> | |
S3Bucket: <input class='field' id='s3bucket' type='text' value='xxxx' required/></br> | |
accessKeyId: <input class='field' id='accessKeyId' type='text' value='yyyy' required/></br> |
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
package quickstart | |
import xitrum.Server | |
object Boot { | |
def main(args: Array[String]) { | |
Server.start() | |
Server.stopAtShutdown() | |
} | |
} |
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
// Save excel friendly csv for Mac/Windows. | |
// See also | |
// http://qiita.com/bump_of_kiharu/items/f41beec668e1f3ea675e#%E5%8F%82%E8%80%83 | |
// https://stackoverflow.com/questions/17879198/adding-utf-8-bom-to-string-blob | |
const UTF16BOM = '\ufeff'; | |
const isIE = false || !!document.documentMode; | |
const isEdge = navigator && /Edge\/\d./i.test(navigator.userAgent); |
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
const recursivify = (api, params, accumurator, condition) => { | |
const exec = (acc) => { | |
return new Promise((resolve, reject) => { | |
api(params, resolve, reject); | |
}) | |
.then((v) => { | |
return Promise.resolve(accumurator(acc, v)); | |
}, | |
() => { | |
return Promise.resolve(acc); |
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 encoding from 'encoding-japanese'; | |
import json2csv from 'json2csv'; | |
let json = [{"text": "日本語"}, {"text": "改行\n改行"}] | |
function saveCsvAsFile(text, filename) { | |
const UTF16BOM = '\ufffe'; | |
const isWindows = navigator.platform.indexOf("Win") !== -1; | |
function isLittleEndian(){ |
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
'use strict'; | |
import _ from 'lodash-compat'; | |
import StyleSheet from 'react-style'; | |
import React from 'react'; | |
import {FontIcon, IconButton, Paper} from 'material-ui'; | |
import {Tabs} from 'react-draggable-tab'; | |
import {COLORS} from '../themes/CommonStyle'; | |
import ClearFix from '../common/ClearFix'; |
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
rm -rf ~/.atom/storage/* |
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/bash | |
curator --host localhost close indices --prefix logstash --older-than 30 --time-unit days --timestring %Y.%m.%d | |
curator --host localhost delete indices --prefix logstash --older-than 60 --time-unit days --timestring %Y.%m.%d | |
curator --host localhost bloom indices --prefix logstash --older-than 2 --time-unit days --timestring %Y.%m.%d |