Skip to content

Instantly share code, notes, and snippets.

@ueki-kazuki
ueki-kazuki / profiles.json
Created February 24, 2020 00:41
Windows Terminal configuration file
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"copyOnSelect": true,
"requestedTheme": "system",
"profiles":
{
"defaults":
import json
def callback(event, context):
body = {
"message": "Go Serverless v1.0! Your function executed successfully!",
"input": event
}
response = {
"statusCode": 200,
public with sharing class DynamicActionController {
public class MyClass {
public Decimal value {get; set;}
public Boolean checked {get;set;}
public MyClass(Decimal value) {
this.checked = false;
this.value = value;
}
}
function (user, context, callback) {
if (context.clientID === 'AUTH0_CLIENT_ID') {
// set AWS settings
context.addonConfiguration = context.addonConfiguration || {};
context.addonConfiguration.aws = context.addonConfiguration.aws || {};
context.addonConfiguration.aws.principal = 'arn:aws:iam::123456789012:saml-provider/auth0-test';
context.addonConfiguration.aws.role = 'arn:aws:iam::123456789012:role/cm-js-sample-role@auth0';
}
callback(null, user, context);
#!/bin/bash
for voice in Mizuki Joanna
do
mkdir -p ${voice}
echo ${voice}
for f in sample*.xml
do
fn=${f%%.*}
echo $fn
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import datetime
import requests
URL = 'http://b.hatena.ne.jp/{user}/atomfeed?date={date}'
def years_ago(years):
if isinstance(years, str) or isinstance(years, unicode):
#!/usr/bin/env ruby
require 'mechanize'
require 'nokogiri'
host = "https://forums.aws.amazon.com"
url = "#{host}/rss.jspa"
# open-uriだと302のリダイレクトが正しく処理できないためMechanizeを使います
mechanize = Mechanize.new
#!/bin/bash
export TZ="Asia/Tokyo"
CHATWORK_API_KEY="YOUR_CHATWORK_API_KEY"
CHATWORK_URL="https://api.chatwork.com/v1"
CHATWORK_TOKEN_KEY="X-ChatWorkToken"
CHATWORK_ROOM_ID="ROOM_ID_TO_POST"
link="http://status.aws.amazon.com/"
#!/usr/bin/env ruby
require 'rexml/document'
require 'json'
file = ARGV[0]
class REXML::Element
def to_h
hash = {}
#!/usr/bin/env ruby
require "aws-sdk-v1"
require "json"
ami_list = { "AWSAmazonLinuxAMI" => {} }
AWS.regions.each do |region|
#next unless region.name == "ap-northeast-1"
AWS.config(:region => region.name)
ec2 = AWS::EC2.new