Skip to content

Instantly share code, notes, and snippets.

View artyomliou's full-sized avatar
🇺🇦

Artyom Liou artyomliou

🇺🇦
View GitHub Profile
@DeRain
DeRain / example.sh
Created November 27, 2017 16:55
Generate .env file from AWS Parameters Store
#Add ENV strings into AWS Parameter Store (as one parameter). All strings will be separated by the newline
#We are getting ENV string separated by the newline and pub them in the dotenv
aws ssm get-parameter --name Param-with-env --region eu-west-1 --query Parameter.Value | sed -e 's/^"//' -e 's/"$//' | awk '{gsub(/\\n/,"\n")}1' >> .env
@abhilash1in
abhilash1in / user-data.sh
Created April 24, 2018 17:06
Install nvm and NodeJS using AWS EC2 user data script
#!/bin/bash
apt-get -y update
cat > /tmp/subscript.sh << EOF
# START UBUNTU USERSPACE
echo "Setting up NodeJS Environment"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc
# Dot source the files to ensure that variables are available within the current shell
. /home/ubuntu/.nvm/nvm.sh
@schwarzeni
schwarzeni / util.go
Last active February 24, 2025 02:57
[golang] get specific network interface's IPv4 address
package util
import (
"errors"
"fmt"
"net"
)
// useful links:
// https://stackoverflow.com/questions/27410764/dial-with-a-specific-address-interface-golang
@kohlerdominik
kohlerdominik / bitbucket-pipelines.yml
Created January 13, 2020 08:55
Simple PHPUnit Testing in Bitbucket Pipeline
pipelines:
pull-requests:
'**':
- step:
name: Build Testing
image: composer:latest
artifacts:
- "vendor/**"
script:
# Install php dependencies
@ruanbekker
ruanbekker / promtail_docker_logs.md
Last active June 13, 2025 04:09
Docker Container Logging using Promtail
@chimit
chimit / bitbucket-pipelines.yml
Created August 7, 2020 02:35
Bitbucket Pipelines config for Laravel 7 with PHP 7.4, GD and EXIF
# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.4-fpm
definitions:
services:
mysql:
@maratori
maratori / .golangci.yml
Last active July 17, 2025 07:18
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.2.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@yftzeng
yftzeng / demo-56.php
Created August 2, 2022 07:20
PHP development progress
<?php
/**
* PHP 5.6
*/
class State
{
const DRAFT = 'draft';
const PUBLISHED = 'published';