LiveCDからインストールを行った
- 容量は20GBくらい割り当てた
- メモリは1GB
- 512MBだと起動がとても遅い
- LiveCDでもCUIで起動できるかも(?)
- デバイス無効化
- オーディオ
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rspec' | |
gem 'rspec-parameterized' | |
end | |
require 'rspec' | |
require 'rspec-parameterized' |
curl -X GET --header "X-Api-Key: ${API_KEYを入れる}" "https://infra-api.newrelic.com/v2/alerts/conditions?policy_id=${ポリシーのid}" | jq . | |
curl -X GET --header "X-Api-Key: ${API_KEYを入れる}" "https://infra-api.newrelic.com/v2/alerts/conditions/${5xx系の監視をしたいコンディションのid}" | jq . | |
curl -X PUT 'https://infra-api.newrelic.com/v2/alerts/conditions/${5xx系の監視をしたいコンディションのid}' -H 'X-Api-Key: ${API_KEYを入れる}' -i -H 'Content-Type: application/json' -d '{"data":{"select_value": "provider.httpCodeElb5XXCount.Sum"}}' |
#include <iostream> | |
#include <vector> | |
#include <map> | |
#include <string> | |
#include <unistd.h> | |
using namespace std; | |
class Lifegame | |
{ | |
private: |
cat printf.md | awk 'BEGIN{i=0} /^$/{print} /^```$/{if(i%2==0){print "[code]"}else{print "[/code]"}i++} /^[^`]{3}/' |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
void replace(char *dest, char *str) | |
{ | |
int length = strlen(str); | |
for (int i=0; i < length; i++) { | |
if ( isupper(str[i]) ) { |
#!/bin/bash | |
eval $(perl -lne 'while(/\s?([^=\s]+)\s?=\s?(\"(?:\\\"|[^\"])+\"|\x27(?:\x27\\\x27\x27|[^\x27])+\x27|\S+)\s?/g){print "$1=$2"}' $1) | |
if [ -z "${ip}" ]; then | |
printf "rc=0 changed=False ip='ip not found'" | |
exit 0 | |
fi | |
ping -w 3 ${ip} >/dev/null 2>&1 | |
if [ $? -eq 0 ]; then |
# /etc/nginx/conf.d/default.conf | |
upstream backend { | |
server 127.0.0.1:8080; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /home/csf/wordpress; | |
index index.html index.htm index.php; | |
keepalive_timeout 300; |