Skip to content

Instantly share code, notes, and snippets.

View hogivano's full-sized avatar
💉
Stay healthy

Hendriyan Ogivano hogivano

💉
Stay healthy
View GitHub Profile
@mrcunninghamz
mrcunninghamz / SelfSignedCert.md
Last active May 13, 2024 20:35
Creating a self signed certificate in a pfx format on a mac.

Create Self Signed Certificate using OpenSSL on a Mac

Introduction

Every now and then I need to create a self signed certificate in azure for something. In my particular case its Azure B2C. I am using a mac so its not simply just running something like

New-SelfSignedCertificate `
    -KeyExportPolicy Exportable `
    -Subject "CN=yourappname.yourtenant.onmicrosoft.com" `
 -KeyAlgorithm RSA `
@windsting
windsting / nginx-stat-failed-13-permission-denied.md
Last active May 6, 2024 06:43
fix: Nginx: stat() failed (13: permission denied)

Nginx: stat() failed (13: permission denied)

from https://stackoverflow.com/questions/25774999/nginx-stat-failed-13-permission-denied

Nginx operates within the directory, so if you can't cd to that directory from the nginx user then it will fail (as does the stat command in your log). Make sure the www-user can cd all the way to the /username/test/static. You can confirm that the stat will fail or succeed by running

sudo -u www-data stat /username/test/static
@suberb
suberb / elementaryos.md
Last active December 25, 2023 19:14
elementaryOS | Things To Do After Installing Elementary OS Loki [Best OS For Switching From Windows & Mac]

FIRST THING FIRST


  • Update OS
sudo apt-get update && sudo apt-get upgrade

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 21, 2024 09:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

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?

@wojteklu
wojteklu / clean_code.md
Last active May 21, 2024 11:23
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

## install
yum install zeromq-devel
## install zmq.so
cd ~
git clone git://github.com/mkoppanen/php-zmq.git
cd php-zmq
phpize && ./configure
make && make install
@patrickcoombe
patrickcoombe / techparticle
Last active August 12, 2021 14:59
Tech Article
<script type="application/ld+json">
{ "@context": "https://schema.org",
"@type": "TechArticle",
"headline": "Extra! Extra! Read alla bout it",
"dependencies": "You must be at least a level 2 PRO to make this happen",
"proficiencyLevel": "Expert",
"alternativeHeadline": "This article is also about robots and stuff",
"image": "http://example.com/image.jpg",
"author": "Patrick Coombe",
"award": "Best article ever written",
<script type="application/ld+json">
{ "@context": "https://schema.org",
"@type": "Article",
"headline": "Extra! Extra! Read alla bout it",
"alternativeHeadline": "This article is also about robots and stuff",
"image": "http://example.com/image.jpg",
"author": "Patrick Coombe",
"award": "Best article ever written",
"editor": "Craig Mount",
"genre": "search engine optimization",
@Michael-Brooks
Michael-Brooks / passwordValidation.php
Last active February 16, 2024 09:29
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
<?php
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
* Password is required with a minimum of 6 characters
* Should have at least 1 lowercase AND 1 uppercase AND 1 number
*/
$rules = [
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
];