Skip to content

Instantly share code, notes, and snippets.

@srz-zumix
srz-zumix / WindowsUpdate.ps1
Created September 14, 2016 04:12
WindowsUpdate powershell
Write-Host "--- Running Windows Update ---"
Write-Host "Searching for updates..."
$updateSession = new-object -com "Microsoft.Update.Session"
$updateSearcher = $updateSession.CreateupdateSearcher()
$searchResult = $updateSearcher.Search("IsInstalled=0 and Type='Software' and AutoSelectOnWebSites=1")
Write-Host "List of applicable items on the machine:"
if ($searchResult.Updates.Count -eq 0) {
Write-Host "There are no applicable updates."
}
else
#!/usr/bin/perl
use strict;
use warnings;
# sets mtime and atime of files to the latest commit time in git
#
# This is useful for serving static content (managed by git)
# from a cluster of identically configured HTTP servers. HTTP
# clients and content delivery networks can get consistent
# Last-Modified headers no matter which HTTP server in the
@srz-zumix
srz-zumix / docker-compose.yml
Last active March 5, 2023 04:41
OpenSTF(DeviceFarmer/stf) for Windows Docker
version: '2'
services:
stfdb:
image: rethinkdb:2
restart: always
ports:
- 8082:8080
- 28015:28015
volumes:
- db_data:/data
@srz-zumix
srz-zumix / docker-cp-repo.sh
Created May 19, 2022 12:17
docker tags copy
#!/bin/bash
# usage: docker-cp-repo.sh src_repo dst_repo
set -euo pipefail
SRC_REPO=$1
DST_REPO=$2
SRC_TAGS=$(curl -s https://registry.hub.docker.com/v1/repositories/${SRC_REPO}/tags | jq -r '.[].name')
DST_TAGS=$(curl -s https://registry.hub.docker.com/v1/repositories/${DST_REPO}/tags | jq -r '.[].name')
@srz-zumix
srz-zumix / .gitconfig
Last active September 9, 2022 03:04
disable fsmonitor for Homebrew
[includeIf "gitdir:/usr/local/Homebrew/**"]
path = ~/.gitconfig_for_homebrew
{
"name": "Slack Free looper",
"flow": [
{
"id": 12,
"module": "util:SetVariables",
"version": 1,
"parameters": {},
"mapper": {
"variables": [
Integromat BASIC Make Core (Annual)
Operations 10,000 10,000
Data transfer 1 GB 5 GB
Minimum interval 5 minutes 1 minutes
Max size of a single file 50 MB 100 MB
Internal data storage 10 MB 10 MB
@srz-zumix
srz-zumix / .cirrus.yml
Created April 8, 2018 13:57
cirrus ci yml sample
# コンテナの指定はタスクごとに指定可能、グローバルデフォルトは以下のように書く
#container:
# 指定できる imgae はこちらを参照 (https://cirrus-ci.org/guide/supported-computing-services/#community-cluster)
# k8s を覚えたら追記
# image: node:latest
# cpu: 4
# memory: 12
# task(他の CI サービスでいうとジョブとか)
# task の前に好きな名前をつけられる、コミットステータスに表示される名称がこれになる
// ConsoleApplication3.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <iostream>
//#include "test.h"
#include <test.h>
int main()
{
std::cout << "Hello World!\n";
@srz-zumix
srz-zumix / ConsoleApplication3.cpp
Last active December 15, 2021 13:22
MSVC-external-anglebracket
// ConsoleApplication3.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <iostream>
#include "test.h"
//#include <test.h>
int main()
{
std::cout << "Hello World!\n";