View myip.sh
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 | |
echo "Public IP:" $(curl -s ifconfig.me) | |
echo "Private IP:" | |
echo "- en0:" $(ipconfig getifaddr en0 || echo 'Not connected') | |
echo "- en5:" $(ipconfig getifaddr en5 || echo 'Not connected') |
View gitlab-remove-artifacts.py
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
#!/usr/bin/env python3 | |
import time | |
import requests | |
project_id = '...' | |
token = '...' | |
server = 'gitlab.com' | |
print("Creating list of all jobs that currently have artifacts...") |
View js.code-workplace
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
{ | |
"folders": [ | |
{ | |
"path": "..." | |
} | |
], | |
"settings": { | |
"emmet.includeLanguages": { | |
"javascript": "html", | |
"vue": "html", |
View use-reduce.js
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
const callbackFunction1 = function( | |
accumulator, | |
currentElement, | |
currentIndex, | |
array | |
) { | |
// Get the maximum by checking first if there is a maximum from the previous step | |
const maximum = accumulator.maximum | |
? // If there is, then check if the current element is higher than the previous maximum |
View amazon-linux2-user-data.sh
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 -ex | |
GITLABUSER=oanhnn | |
SSHUSER=oanhnn | |
addgroup dev | |
adduser --disabled-password --ingroup dev $SSHUSER | |
usermod -aG sudo $SSHUSER | |
mkdir -p /home/$SSHUSER/.ssh |
View input-range.scss
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
// Styling Cross-Browser Compatible Range Inputs with Sass | |
// Github: https://github.com/darlanrod/input-range-sass | |
// Author: Darlan Rod https://github.com/darlanrod | |
// Version 1.4.1 | |
// MIT License | |
$track-color: #eceff1 !default; | |
$thumb-color: #607d8b !default; | |
$thumb-radius: 12px !default; |
View install-redis.sh
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 | |
############################################### | |
# To use: | |
# chmod +x install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
version=3.2.0 | |
echo "*****************************************" | |
echo " 1. Prerequisites: Install updates, set time zones, install GCC and make" |
View install_wkhtmltopdf.sh
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
#!/usr/bin/env bash | |
VERSION=${1:-0.12.4} | |
yum -y install fontconfig libXrender libXext xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi freetype libpng zlib libjpeg-turbo openssl icu | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${VERSION}/wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz --dns-timeout=5 --connect-timeout=5 | |
tar -xJf wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz | |
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf | |
cp wkhtmltox/bin/wkhtmltoimage /usr/local/bin/wkhtmltoimage |
View remove-vhost.sh
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
#!/usr/bin/env bash | |
DOMAIN=${1:-example.local} | |
APP_SLUG=${2:-example} | |
service nginx stop | |
rm -rf /etc/nginx/sites-available/10-${APP_SLUG}.conf /etc/nginx/sites-enabled/10-${APP_SLUG} | |
echo "[✔] Remove Virtual Host for ${DOMAIN}" |
View laravel-queue.service
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
# Laravel queue worker using systemd | |
# ---------------------------------- | |
# | |
# /lib/systemd/system/queue.service | |
# | |
# run this command to enable service: | |
# systemctl enable queue.service | |
[Unit] | |
Description=Laravel queue worker |
NewerOlder