Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Error: docker-compose is not installed.' >&2
exit 1
fi
domains=(api.pengudb.com alpha.pengudb.com)
rsa_key_size=4096
data_path="./certbot"
@frknbasaran
frknbasaran / nginx.conf
Last active July 25, 2020 23:42
Configured nginx.conf file for registry-builder.sh
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
@frknbasaran
frknbasaran / registry.usemevo.com
Last active February 28, 2023 15:13
Nginx conf file for registry.usemevo.com
server {
listen 80;
listen [::]:80;
root /var/www/registry.usemevo.com/html;
index index.html index.htm index.nginx-debian.html;
server_name registry.usemevo.com;
location / {
@frknbasaran
frknbasaran / registry-builder.sh
Last active July 26, 2020 00:56
create your own docker registry on ubuntu 18.04 (tested especially on digitalocean)
#
# This script will make it easier your private docker registry
# build process on Ubuntu 18.04.
# It may require press enter during works.
#
# I recommend to run this script on initial server setup
# that contain Ubuntu 18.04.
#
# Created by Furkan Basaran <github.com/@frknbasaran>
# at 26.07.2020
@frknbasaran
frknbasaran / docker-compose.yml
Last active July 25, 2020 23:38
docker-compose file for self-hosted docker registry
version: '3'
services:
registry:
image: registry:2
ports:
- "5000:5000"
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry
@frknbasaran
frknbasaran / next.sh
Last active July 9, 2019 14:09
./next.sh githubUsername bitbucketUsername bitbucketPassword
#!/bin/bash
# change the value of [enterprise-plugin-addr]
# change the value of [ssl-compatible-nginx-config-file-path]
if [ -z "$1" ]
then
echo "Github username isn't provided. It should provide as first parameter."
exit 1
fi
<script src="/countly-web-sdk/plugins/adapter.js"></script>
<script src="/countly-web-sdk/plugins/adapter.js"></script>
@frknbasaran
frknbasaran / mapped_actions.js
Created November 6, 2018 11:58
Full list of mapped GA actions to Countly.
/*
* Track pageview
*/
// GA
ga('send', 'pageview', location.pathname);
// Mapped Countly Action
Countly.q.push(['track_pageview',location.pathname]);
Countly.q.push(['add_event', {
"key":"ecommerce:addItem",
"count":5,
"sum":'11.99',
"segmentation":{
"id":"1234",
"name":"Fluffy Pink Bunnies",
"sku":"DD23444",
"category":"Party Toys"
}