Skip to content

Instantly share code, notes, and snippets.

View anhphamt's full-sized avatar

Phamazing anhphamt

View GitHub Profile
@dhirajbajaj
dhirajbajaj / successful-rails-nginx-production-deployment.txt
Created January 12, 2016 11:42 — forked from jimmypocock/successful-rails-nginx-production-deployment.txt
Ruby on Rails / Postgres / Nginx / Passenger / Capistrano / Ubuntu 14.04 / AWS
#####################################
# 0. SET UP AWS (ASSUMING YOU HAVE ALREADY SET UP AN ACCOUNT)
# CREATE SECURITY GROUP
• In the EC2 Dashboard, click Security Groups, then Create Security Group.
• Enter Name
• Enter Description
• Rules to add:
- HTTP
- SSH
@ediblecode
ediblecode / common-docker-commands.sh
Last active October 4, 2023 01:52
Common docker commands
# If the commands fail on Windows, then make sure you're running in GitBash/Cygwin and NOT cmd
# HELP!
docker --help
# List docker images
docker images
# List running containers
docker ps
@nikopol
nikopol / dom-core.cljs
Last active September 15, 2019 01:31
minimalist dom manipulation clojure script library
(ns dom.core
(:require [clojure.string :as str]
[clojure.set :refer [difference union]]))
; sample usage:
; (-> (all ".class") (hide) (+css "titi") (clear) (html "<span>zob</span>") (show))
(defn- nodelist-coll [nodelist]
(doall (map #(.item nodelist %) (range (.-length nodelist)))))
@anhphamt
anhphamt / install_supervisord_centos.md
Last active February 22, 2022 04:00 — forked from fadhlirahim/installing_supervisor_macosx.md
Setting up supervisord in Mac OSX or CENTOS
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active April 24, 2025 10:23
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@BretFisher
BretFisher / Dockerfile
Last active June 27, 2024 13:43
WIP sample Laravel php_fpm plus nginx plus supervisor Docker setup with npm, composer, bower, and more
FROM yourdockername/base-php-nginx:latest AS build
# BUILD STAGE
# the primary reason we have two build stages is so SSH key of private repo's will never
# be in final image
# COPY IN BUILD SSH KEY
# It won't be copied to final image
# add this build arg to compose file
ARG BUILDKEY
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi