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
http://blog.kenweiner.com/2009/08/serving-gzipped-javascript-files-from.html | |
find . -type f ! -name '*.gz' -exec gzip "{}" \; |
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
from django.utils.crypto import get_random_string | |
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' | |
get_random_string(50, chars) |
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 | |
#source https://raw.githubusercontent.com/Springest/elastic-beanstalk-deploy-notifications/bb9f1f77d6842dda005ed2c5795adf8a3ccf4b58/slack_deploy.sh | |
version="1.0" | |
function usage { | |
echo "AWS Elastic Beanstalk Deployment Notifications for Slack (v${version})" | |
echo | |
echo "Usage: appsignal_deploy.sh -a <APP NAME> -c <SLACK CHANNEL> -w <WEBHOOK URL> [options]" | |
echo | |
echo "Options:" |
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 json | |
from botocore.exceptions import ClientError | |
import boto3 | |
import sys | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
from zabbix.api import ZabbixAPI |
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
machine: | |
services: | |
- docker | |
post: | |
- wget https://gist.githubusercontent.com/gianrubio/dce37ee9b9c024937832d776597e2603/raw/4cdb30e5075e8e6064ac48a258e05f518f8c88c0/circleci-tunnel.sh ~/ && chmod +x ~/circleci-tunnel.sh | |
- ~/circleci-tunnel.sh start: | |
background: true |
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
echo 127.0.0.1 localhost > /etc/hosts | |
echo `ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'` `hostname` >> /etc/hosts |
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
FROM alpine:3.3 | |
# Here we install GNU libc (aka glibc) and set C.UTF-8 locale as default. | |
ENV LC_ALL=en_US.UTF-8 \ | |
LANG=en_US.UTF-8 \ | |
LANGUAGE=en_US.UTF-8 | |
RUN ALPINE_GLIBC_BASE_URL="https://github.com/andyshinn/alpine-pkg-glibc/releases/download" && \ | |
ALPINE_GLIBC_PACKAGE_VERSION="2.23-r1" && \ | |
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ |
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 logging | |
import time | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
ch = logging.StreamHandler(sys.stdout) | |
ch.setFormatter(logging.Formatter("%(levelname)s %(asctime)s %(funcName)s %(lineno)d %(message)s")) | |
logger.addHandler(ch) |
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
or i in `kubectl get nodes |grep -v "NAME"| awk '{print $1}'`; do ssh -t core@$i "sudo sysctl net.netfilter.nf_conntrack_max=1000000" ;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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch", | |
"type": "go", | |
"request": "launch", | |
"mode": "debug", | |
"remotePath": "", |
OlderNewer