Skip to content

Instantly share code, notes, and snippets.

View codex5's full-sized avatar

Tyler Nguyen codex5

  • Vietnam
View GitHub Profile
@codex5
codex5 / multisite.conf
Created August 19, 2022 14:21 — forked from graham-aa/multisite.conf
WordPress NGINX MultiSite Config
server {
listen 80;
server_name site_url;
root /dir/of/site;
# access_log /srv/www/domain.com/log/access.log;
# error_log /srv/www/domain.com/log/error.log;
location / {
index index.php;
@codex5
codex5 / GoogleDorking.md
Created July 11, 2022 17:21 — forked from sundowndev/GoogleDorking.md
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@codex5
codex5 / DOCKER_COMPOSE.md
Created April 14, 2022 18:19 — forked from GabrielCzar/DOCKER_COMPOSE.md
Docker compose samples

Scripts to run specific services

backend example1 {
.host = "backend.example1.com";
.port = "8080";
}
backend example2 {
.host = "backend.example2.com";
.port = "8080";
}
sub vcl_recv {
if (req.http.host == "example1.com") {
@codex5
codex5 / cart.liquid
Created January 1, 2020 13:31 — forked from kartick14/cart.liquid
Apply discount code from cart page in shopify
<div class="discountcodefield">
<label for="discount">Discount Code:</label>
<input autocomplete="off" type="hidden" name="discount" class="discount_code" />
<input autocomplete="off" type="text" name="discount_code" class="discount_code_field" />
<input type="button" name="apply_discount_code" class="btn discount_code_btn" value="Apply"/>
</div>
<div class="cart__savings discount_apply_code">
</div>
@codex5
codex5 / cartDiscount.liquid
Created January 1, 2020 13:24 — forked from atikju/cartDiscount.liquid
Shopify - Apply Discount / Coupon / Promo Code on cart page
<div class="cart-promo">
<h2>ENTER A PROMO CODE</h2>
<input type="text" id="devPromo">
<a href="/checkout?discount=none" id="redemDevPromo">Apply Coupon</a>
</div>
<script>
$(document).ready(function(){
//listen to the promo button click
$('#redemDevPromo').on('click', function(event){
//disable the button event
@codex5
codex5 / deploy.sh
Created November 9, 2019 08:37 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd /home/forge/domain.com
# Turn on maintenance mode
php artisan down
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin master
## phpMyAdmin configuration
location ~ ^/PHPMYADMIN_PLACEHOLDER/(.*)$ {
alias /usr/share/phpMyAdmin/$1;
location ~ ^/PHPMYADMIN_PLACEHOLDER/(.+\.php)$ {
alias /usr/share/phpMyAdmin/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
Varnish: 6081
Nginx: 8080, 443, 80
Varnish Backend
server {
server_name {SERVERNAMES};
listen 8080;
set $MAGE_ROOT /home/{USER}/public_html/magento;
set $MAGE_MODE production;
@codex5
codex5 / wordpress_nginx_config.conf
Created September 28, 2019 04:45 — forked from rkjha/wordpress_nginx_config.conf
a sample wordpress config for nginx
server {
listen 80;
root /home/username/example.com;
index index.php index.html;
server_name example.com;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;