Skip to content

Instantly share code, notes, and snippets.

View Noppy's full-sized avatar

N.Fujita Noppy

View GitHub Profile
@Noppy
Noppy / verifying_memory.c
Last active May 17, 2020 04:49
Verifying on Memory behavior
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
#define LENGTH (64UL*1024*1024)
#define INTERVAL 10
void print_time(char *buf){
struct timespec ts;
@Noppy
Noppy / collect_mem.sh
Last active March 5, 2020 21:43
collect memory information(free command and /proc/meminfo), and output in CSV format.
#!/usr/bin/bash
#---------------------
# Copyright 2017 N.Fujita
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description" : "This template installs a WordPress deployment using a multi-az Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files at instance launch time. ",
"Parameters" : {
"KeyName": {
"Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription": "must be the name of an existing EC2 KeyPair."
},
"DBName": {
@Noppy
Noppy / README.md
Last active June 13, 2018 11:00
srpm2html.py: Generate a HTML from a SRPM source package.

NAME

Generate a HTML from a SRPM source package.

SYNOPSIS

usage: srpm_to_html.py [-h] [-d] [-t TMPDIR] [-r RPMBUILDDIR] [-s SQUASHFSDIR]  
                       [-K HTTP_KERNELSDIR] [-T HTTP_TOOLSDIR] [-S SOURCEDIR]  
                       SRPM_FilePath_or_URL  

DESCRIPTION

  • positional arguments:
    • SRPM_FilePath_or_URL specify a Source Package(SRPM)'file path or URL.
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description" : "Creates an VPC, 2 public subnets, 2 private subnets, and an Amazon EC2 instance.EC2 instance is Amazon Linux and ts2.nano",
"Parameters" : {
"KeyName": {
"Description" : "Name of an existing EC2 key pair for SSH access to the EC2 instance.",
"Type": "AWS::EC2::KeyPair::KeyName"
}
},
"Resources": {
{
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"MainVPC": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"EnableDnsSupport": "true",
"EnableDnsHostnames": "true",
"InstanceTenancy": "default",
@Noppy
Noppy / ReadMe.md
Last active August 18, 2017 14:14
Create ansible-playbook directories.

NAME

create_ansible_dirs.sh - create ansible-playbook directories

##SYNOPSIS create_ansible_dirs.sh [role_name1] [role_name2] ...

##DESCRIPTION Create_ansible_dirs is creating directories for ansible best practices playbooks. the created directories will be in the structure such as the following.

*Let's pre-create this directory befor exec shell!