Skip to content

Instantly share code, notes, and snippets.

View sergeycherepanov's full-sized avatar
:bowtie:
Focusing

S.Cherepanov sergeycherepanov

:bowtie:
Focusing
View GitHub Profile
@vittee
vittee / parser_phperror.rb
Last active May 6, 2020 10:06
Simple Fluentd Parser Plugin for parsing PHP Error.
# vim: ts=2
#
require 'fluent/parser'
module Fluent
class TextParser
class PhpErrorParser < Parser
Plugin.register_parser('phperror', self)
config_param :xdebug, :bool, :default => false
@barroco
barroco / raven-shell
Last active May 4, 2024 11:25
Send Sentry error from shell using curl
#!/bin/sh
SENTRY_KEY=
SENTRY_SECRET=
SENTRY_PROJECTID=1
SENTRY_HOST=sentry.example.com
SCRIPT_ARGUMENTS=$@
capture_error()
{
etcd:
image: kubernetes/etcd:2.0.5.1
net: "host"
command: /usr/local/bin/etcd --addr=127.0.0.1:4001 --bind-addr=0.0.0.0:4001 --data-dir=/var/etcd/data
master:
image: gcr.io/google_containers/hyperkube:v0.14.1
net: "host"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/sebgoa/master.json:/etc/kubernetes/manifests/master.json
@kany
kany / sendmail_setup.md
Last active September 22, 2023 00:16
Setup SENDMAIL on Mac OSX Yosemite
@kyledrake
kyledrake / gist:d7457a46a03d7408da31
Last active October 22, 2023 12:25
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
# Procedure is for Ubuntu 14.04 LTS.
# Using these guides:
# http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
# https://turboflash.wordpress.com/2009/06/23/curl-adding-installing-trusting-new-self-signed-certificate/
# https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/
# Generate the root (GIVE IT A PASSWORD IF YOU'RE NOT AUTOMATING SIGNING!):
openssl genrsa -aes256 -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
@yuanying
yuanying / vagrant-kvm.md
Last active April 17, 2024 08:12
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@iansltx
iansltx / _safari-iframe-cookie-workaround.md
Last active April 7, 2024 15:44
Safari iframe cookie workaround
@SchumacherFM
SchumacherFM / cron.sh
Created August 18, 2014 00:06
Magento cron.sh file for OSX
#!/bin/sh
# location of the php binary
if [ ! "$1" = "" ] ; then
CRONSCRIPT=$1
else
CRONSCRIPT=cron.php
fi
MODE=""
if [ ! "$2" = "" ] ; then
@morhekil
morhekil / nginx.conf
Created August 14, 2014 12:18
Full request/response body logging in nginx
http {
log_format bodylog '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time '
'<"$request_body" >"$resp_body"';
lua_need_request_body on;
set $resp_body "";
body_filter_by_lua '
@ryan-lane
ryan-lane / Calling salt-call with environment variables
Last active May 24, 2022 06:52
Using an environment variable in a state file
MYENVVAR="world" salt-call state.template test.sls