Skip to content

Instantly share code, notes, and snippets.

View shudarshon's full-sized avatar
🎯
Focusing

Shudarshon Chaki shudarshon

🎯
Focusing
View GitHub Profile
@tovbinm
tovbinm / crontab
Created February 22, 2012 01:10
Logrotate & upload nginx logfiles to s3://bucket/dt=..../hostname.log...gz
# Nginx - logrotate & upload to S3
0 0 * * * /usr/sbin/logrotate /etc/logrotate.d/nginx
15 0 * * * s3cmd put /var/log/nginx/access.log-`date +"\%Y\%m\%d"`.gz s3://$LOGS_BUCKET_NAME/nginx-access/`date +"dt=\%Y\%m\%d"`/`hostname -s`.access.log-`date +"\%Y\%m\%d"`.gz
@thoroc
thoroc / gist:9970941
Last active December 24, 2017 17:57
A collection of Unix/Linux find command examples

source: http://alvinalexander.com/unix/edu/examples/find.shtml

basic 'find file' commands

find / -name foo.txt -type f -print             # full command
find / -name foo.txt -type f                    # -print isn't necessary
find / -name foo.txt                            # don't have to specify "type==file"
find . -name foo.txt                            # search under the current dir
@ivodvb
ivodvb / install.sh
Created April 22, 2018 12:03
goaccess setup (tested on Ubuntu 16.04 and Debian 7)
apt update && apt upgrade -y && \
apt install -y libncursesw5-dev libglib2.0-dev libgeoip-dev libtokyocabinet-dev build-essential && \
wget http://tar.goaccess.io/goaccess-1.2.tar.gz && \
tar -xzvf goaccess-1.2.tar.gz && \
cd goaccess-1.2/ && \
./configure --enable-utf8 --enable-geoip=legacy && \
make && \
make install && \
sed -i 's/\#time-format %H:%M:%S/time-format %H:%M:%S/g' /usr/local/etc/goaccess.conf && \
sed -i 's/\#date-format %d\/%b\/%Y/date-format %d\/%b\/%Y/g' /usr/local/etc/goaccess.conf && \
@ralph-tice
ralph-tice / gist:3d6e5b2076cbc2900aaa
Last active December 25, 2018 11:17
terraform for 3 AZ VPC with NAT instance with autorecovery
###########
# Variables
###########
variable "aws_key_name" {
default = "mykeypair"
}
variable "region" {
default = "eu-west-1"
}
@akoumjian
akoumjian / salt_masterless_quickstart.rst
Created December 7, 2012 23:26
Salt Masterless Quickstart Guide

Salt Masterless Quickstart

Running a masterless salt-minion lets you use salt's configuration management for a single machine. It is also useful for testing out state trees before

@zyphlar
zyphlar / cloudwatch-alarm-to-slack.js
Last active February 6, 2019 12:00
See comments
'use strict';
/**
* See http://notes.webutvikling.org/send-aws-cloudwatch-alarms-to-slack/ for instructions
* But I like this code better because the snsToSlack.js code doesn't parse the CloudWatch JSON
*
* Follow these steps to configure the webhook in Slack:
*
* 1. Navigate to https://<your-team-domain>.slack.com/services/new
*
@tamsky
tamsky / buildspec.yml
Created August 28, 2018 15:29 — forked from Jamie-BitFlight/buildspec.yml
Terraform module that causes aws_codebuild_project to fail
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws --version
- eval $(aws ecr get-login --region $AWS_DEFAULT_REGION --no-include-email)
- REPOSITORY_URI=${ecr_address}
- GITHUB_TOKEN=${gh_token}
@ryanhanwu
ryanhanwu / README.md
Last active June 17, 2019 14:28
Auto deployment script for CI with Git/Node.JS/Forever

Auto deployment script for CI with Git/Node.JS/Forever

Usage

1.Simply add the deploy.sh to your application folder

2.Start your service

deploy.sh start myApp.js
@StevenACoffman
StevenACoffman / Continuous Delivery Ideas.md
Last active December 28, 2019 23:49
Continuous Delivery Ideas

Hackathon Requirements

In order to organize a hackathon, we have to describe:

  • What the hackathon is about
  • What the benefits are
  • How the results/benefits will be reported
  • then talk to the resource managers and product managers with that stuff

General Requirements

We want per-branch automatic k8s deploys in our staging environment. Each github branch of a repo has an instance of - running. Deployments self-destruct after 4 hours if the branch is not master. Anyone can trigger a new build with a comment on a pull request (or new commit).

@javagrails
javagrails / solr data type field mapping info.json
Last active July 13, 2020 08:44
solr data type field mapping
https://bigwisdom.net/solr-tutorial-learn-solr-in-2-hours/
========================== Solr Basic Data Types for Index =============================
Data Type |Index_Suffix |Example
----------------------------------------------------------------------
String _s id:"1051",
String _s url_s:"https://javagrails.wordpress.com/",
String _s title_s:"MackBookProkk",
String _s description_s:"dmlasd",
String _s duration_s:"dasdsad",