Skip to content

Instantly share code, notes, and snippets.

@sasha-id
sasha-id / Chart.js
Last active May 20, 2020 04:43
react-stockcharts Zone component
<Zone zones={[
{
id: 'pre',
start: { hours: 4, minutes: 0, seconds: 0 },
end: { hours: 9, minutes: 30, seconds: 0 },
fill: "#999999",
opacity: 0.1,
startLine: {
stroke: '#3d7cd4',
strokeWidth: 1,
@roommen
roommen / OpenSSH Update Script - Amazon Linux 2
Last active May 6, 2024 21:08
OpenSSH Update Script - Amazon Linux 2
#!/bin/bash
sudo yum install gcc -y
sudo yum install openssl-devel -y
sudo yum install zlib-devel -y
sudo yum install mlocate -y
sudo yum install autoconf -y
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz
tar zxvf openssh-9.1p1.tar.gz
cd openssh-9.1p1 && ./configure && make && sudo make install
@den-crane
den-crane / gist:6eff375752a236a456e1b3dc2ca7db62
Last active September 30, 2023 08:43
Clickhouse example AggregatingMergeTree, (max, min, avg ) State / Merge
DROP TABLE IF EXISTS requests;
CREATE TABLE requests (
request_date Date,
request_time DateTime,
response_time Int,
request_uri String)
ENGINE = MergeTree(request_date, (request_time, request_uri), 8192);
@tadast
tadast / ssl_puma.sh
Last active January 29, 2024 04:41 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@sasha-id
sasha-id / delayed_job.conf
Created March 26, 2012 05:22
Upstart delayed_job script
# Copy:
# /etc/init/delayed_job.conf
# Execute:
# ln -s /lib/init/upstart-job /etc/init.d/delayed_job
# Change user name
description "Start up the delayed_job service"
start on runlevel [2345]
stop on runlevel [06]
@sasha-id
sasha-id / README
Created March 23, 2012 15:03
MongoDB multiple instance upstart scripts: mongodb, mongod --configsvr and mongos
MongoDB upstart scripts for Ubuntu.
Run following commands after installing upstart scripts:
ln -s /lib/init/upstart-job /etc/init.d/mongoconf
ln -s /lib/init/upstart-job /etc/init.d/mongodb
ln -s /lib/init/upstart-job /etc/init.d/mongos
To start services use: