export AWS_DEFAULT_REGION=ap-northeast-1
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | \
awk '{print $2}' | grep -v ^$ | while read x; do echo "deleting $x" ; aws logs delete-log-group --log-group-name $x; done
This file contains 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
#!/bin/bash | |
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# kevin gallagher (@ageis) <kevingallagher@gmail.com> | |
# normally I divide this into separate files: .bashrc, .bash_profile, .bash_aliases and .bash_functions (also .bash_logout), but it's all concatenated here. | |
ulimit -s unlimited | |
export MYUID=$(id -u) | |
export USER="$(id -un)" | |
if [[ "$TILIX_ID" ]] || [[ "$VTE_VERSION" ]]; then |
This file contains 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
#! /usr/bin/env ruby | |
# NOTE: Requires Ruby 2.1 or greater. | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created |
This file contains 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
import boto3 | |
import argparse | |
import string | |
parser = argparse.ArgumentParser('Change storage class of s3 objects') | |
parser.add_argument('--bucket', dest='myBucket', default='yourBucketName', help='S3 Bucket to search') | |
parser.add_argument('--from', dest='fromPath', default='', help='s3 path to start search from') | |
cliArgs = parser.parse_args() |
This file contains 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
# Description: Boxstarter Script | |
# Author: Jess Frazelle <jess@linux.com> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
This file contains 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
#/bin/bash | |
# This script will push your local repository's latest commit to a remote repository on your server. | |
# It's useful for quickly pushing your local changes to deployment servers (Dev, Stage, Prod/Live, etc.) | |
# | |
# This file should be placed in your remote server's project's git hooks folder and named .git/hooks/post-receive. | |
# Security reminder: Your web server should not allow access to the /.git folder URL | |
# | |
# Ensure that this script is executable: | |
# $ chmod +x .git/hooks/post-receive |
This file contains 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
# | |
# Replace FILESYSTEM-ID-HERE and REGION-ID-HERE | |
# | |
option_settings: | |
- option_name: EFS_VOLUME_ID | |
value: FILESYSTEM-ID-HERE | |
- option_name: EFS_REGION | |
value: REGION-ID-HERE |
This file contains 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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: pocketmine | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: | |
# Should-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 |
This file contains 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
#!/bin/bash | |
# remove ':' from screen id | |
PROFILE="session${DISPLAY#:}" | |
PROFILE_DIRECTORY="$HOME/.google-chrome/$PROFILE" | |
mkdir -p $PROFILE_DIRECTORY | |
# import profile (includes bookmark) from origin | |
if [ ! -d "$PROFILE_PATH/Default" ]; then | |
cp -r $HOME/.config/google-chrome/Default $PROFILE_DIRECTORY/Default; |
This file contains 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
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
NewerOlder