Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

devmaycry xdevmaycry

🎯
Focusing
Block or report user

Report or block xdevmaycry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xdevmaycry
xdevmaycry / main.md
Last active Jun 15, 2019
Setup repo deploy key to allow private NPM Package hosted on Github.com be read by CircleCI
View main.md

Setup repo deploy key to allow private NPM Package hosted on Github.com be read by CircleCI

Takes about 2 minutes

1. Add the private package to your project and test the git link

GitHub, private repo:

@xdevmaycry
xdevmaycry / .bash_profile
Last active May 24, 2019
WSL aka Windows Subsystem for Linux
View .bash_profile
## To make sure ~/.bashrc gets autoladed when launching WSL
if [[ -f ~/.bashrc ]] ; then
. ~/.bashrc
fi
## To make sure ~/.zshrc gets autoladed when launching WSL
if [[ -f ~/.zshrc ]] ; then
. ~/.zshrc
fi
@xdevmaycry
xdevmaycry / nginx.conf
Created Feb 22, 2019 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View crontab.md

install cron job at root

sudo crontab -e

renew every day at 10:59pm

59 22 * * * /usr/bin/certbot renew > /home/ubuntu/logs/certbot.log
@xdevmaycry
xdevmaycry / mysql-docker.sh
Last active Nov 1, 2018 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
###############
# MODIFIED FOR SECURITY
#
# This assumes we have the following environmental variables setup through docker composer configuration
# MYSQL_DB
# MYSQL_USER
# MYSQL_PASSWORD
###############
# Backup
View script_name.sh
#!/bin/bash
#
# /etc/rc.d/init.d/script_name
# script_name This shell script takes care of starting and stopping
# script_name (the Fedora Directory Server)
#
# Author: Brian Jones
# This e-mail address is being protected from spambots. You need JavaScript enabled to view it
# Taken from: https://www.linux.com/learn/managing-linux-daemons-init-scripts
#
@xdevmaycry
xdevmaycry / get_file_last_modified_date.js
Last active Feb 1, 2018
Get Last Modified Date from a Public Accessible File (Async). No external libraries required. ECMAScript 5.
View get_file_last_modified_date.js
/*
*
* Fiddle: https://jsfiddle.net/w79L4wan/10/
*/
function ready(callback) {
// in case the document is already rendered
if (document.readyState!='loading') callback();
// modern browsers
else if (document.addEventListener) document.addEventListener('DOMContentLoaded', callback);
View gist:8ef4113ca318f48f6a64
" show hidden characters in Vim
:set list
" settings for hidden chars
" what particular chars they are displayed with
:set lcs=tab:▒░,trail:
" or
:set listchars=tab:▒░,trail:
" used \u2592\u2591 for tab and \u2593 for trailing spaces in line.
" In Vim help they suggest using ">-" for tab and "-" for trail.
You can’t perform that action at this time.