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
@echo off | |
for /f "delims=" %%i in ('dir /a-d/b/s *.png *.jpg') do cwebp -q 80 "%%i" -o "%%~pi%%~ni.webp" | |
pause >nul |
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
version: '3.4' | |
services: | |
hoge: | |
image: hogeimage:0.0.1 | |
build: | |
context: . | |
dockerfile: hoge/Dockerfile | |
ports: | |
- 80:3000 |
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
cd "$(ProjectDir)" | |
xcopy /y "$(ProjectDir)*.cs" "{destination}" | |
mpc.exe -i "$(ProjectPath)" -o "{destination}\MessagePackGenerated.cs" |
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
var script = document.createElement('script'); | |
script.src='https://cdn.pubnub.com/sdk/javascript/pubnub.4.20.1.min.js'; | |
script.onload = function() { | |
var pubnub = new PubNub({ | |
subscribeKey: "sub-c-52a9ab50-291b-11e5-baaa-0619f8945a4f", | |
publishKey: "nopublishkey", | |
ssl: true | |
}) | |
pubnub.addListener({ |
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
$dir = "target directory" | |
Get-ChildItem $dir -Recurse -Include *.cs | Rename-Item -NewName {$_.FullName + ".bkup"} | |
Get-ChildItem $dir -Recurse -Include *.cs.bkup | ForEach-Object {Get-Content $_.FullName | Out-File -Encoding UTF8 ($_.FullName -replace '.bkup','')} | |
Get-ChildItem $dir -Recurse -Include *.cs.bkup | del | |
Get-ChildItem $dir -Recurse -Include *.cshtml | Rename-Item -NewName {$_.FullName + ".bkup"} | |
Get-ChildItem $dir -Recurse -Include *.cshtml.bkup | ForEach-Object {Get-Content $_.FullName | Out-File -Encoding UTF8 ($_.FullName -replace '.bkup','')} | |
Get-ChildItem $dir -Recurse -Include *.cshtml.bkup | del |
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 puppeteer = require("puppeteer"); | |
const sendgrid = require("sendgrid").mail; | |
const sendgridApiKey = process.env.SENDGRID_API_KEY; | |
const fromEmail = "[email protected]"; | |
const toEmail = "[email protected]"; | |
const targetUrl = "https://example.com"; | |
puppeteer.launch().then(async browser => { | |
try { | |
const page = await browser.newPage(); |
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
# AWS | |
http://qiita.com/yuroyoro/items/08cded7662cf494d53f2 | |
# GCP | |
$("td.ng-isolate-scope").each(function(i,e){var s=$($(e)[0]).text(); if(s.includes("$")){var v=s.replace(/[^0-9^\.]/g,"")*24*30*112;$(e).text(s+" | 月額 "+v.toFixed(0)+"円");}}); | |
# Azure | |
$("span.price-data ").each(function(i,e){var s=$($(e)[0]).text(); var v=s.replace(/[^0-9^\.]/g,"")*24*30;$(e).text(s+" | 月額 "+v.toFixed(0)+"円");}); |
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
# stop all containers | |
FOR /f "tokens=*" %i IN ('docker ps -a -q') DO docker stop %i | |
# delete all containers | |
FOR /f "tokens=*" %i IN ('docker ps -a -q') DO docker rm %i | |
# delete all images | |
FOR /f "tokens=*" %i IN ('docker images -a -q') DO docker rmi -f %i |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public static class TechnicalAnalysisFormula | |
{ | |
public static double Rsi(double[] source, int period) | |
{ | |
if (source == null) throw new ArgumentNullException(nameof(source)); | |
if (source.Length <= period) throw new ArgumentException(nameof(source) + ".Length <= period"); |
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
using System; | |
using System.Linq; | |
using System.Web.Mvc; | |
namespace SampleApp.Helpers | |
{ | |
public static class HtmlHelperExtensions | |
{ | |
public static SelectListItem[] Months(this HtmlHelper htmlHelper, DateTime from, DateTime to, DateTime selected) | |
{ |
NewerOlder