Skip to content

Instantly share code, notes, and snippets.

View gegere's full-sized avatar

Jason Gegere gegere

View GitHub Profile
@maxivak
maxivak / _0__ssl_certbot_letsencrypt.md
Last active April 16, 2024 21:48
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \
@glueckpress
glueckpress / exclude
Last active January 4, 2023 17:57
[git] Exclude .gitignore and all of WordPress, except specified directories
# Sample of .git/info/exclude
# Documentation: https://git-scm.com/docs/gitignore
# Exclude .gitignore file.
# If an initial .gitignore file has been added to the repo,
# you might have to delete it first and sync the change.
# Then create a new one which will be excluded according to this rule.
.gitignore
# Exclude all of WordPress, but keep these directories synced:
@devinsays
devinsays / set-cookie-wordpress.php
Last active November 13, 2023 13:04
How to set a cookie using PHP in WordPress

Write a function that counts how many different ways you can make change for an amount of money, given an array of coin denominations. For example, there are 3 ways to give change for 4 if you have coins with denomination 1 and 2:

1+1+1+1, 1+1+2, 2+2. The order of coins does not matter:

1+1+2 === 2+1+1 Also, assume that you have an infinite ammount of coins.

Your function should take an amount to change and an array of unique denominations for the coins:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@m1st0
m1st0 / php_build_ubuntu.sh
Last active November 25, 2023 07:33
Compiling PHP 8 on Ubuntu 22.10 with Various Supported Modules
#!/bin/bash
# PHP 8 Compile #
# Author: Maulik Mistry
# Please share support: https://www.paypal.com/paypalme/m1st0
# References:
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
# root-talis https://gist.github.com/root-talis/40c4936bf0287237839ccd3fdfdaec28
#
@consti
consti / hosts
Last active April 23, 2024 19:50
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
/* usbreset -- send a USB port reset to a USB device
*
* Compile using: gcc -o usbreset usbreset.c
*
*
* */
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/