Skip to content

Instantly share code, notes, and snippets.

View diegosparente's full-sized avatar
🎯
Focusing

Diego Parente diegosparente

🎯
Focusing
View GitHub Profile
@diegosparente
diegosparente / install-openjdk.txt
Created January 8, 2024 00:54 — forked from douglarek/install-openjdk.txt
How to install openJDK 11 on macOS
$ curl -C - https://download.java.net/java/ga/jdk11/openjdk-11_osx-x64_bin.tar.gz -O openjdk-11_osx-x64_bin.tar.gz
$ tar xf openjdk-11_osx-x64_bin.tar.gz
$ sudo mv jdk-11.jdk /Library/Java/JavaVirtualMachines/
$ java -version
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
@diegosparente
diegosparente / php-style-guide.md
Created July 29, 2022 19:13 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@diegosparente
diegosparente / install_oci8_ubuntu20_php7.4.md
Created April 29, 2022 16:59 — forked from eSkiSo/install_oci8_ubuntu20_php7.4.md
Install OCI8 (Oracle) in Ubuntu 20 with PHP 7.4
#!/bin/bash
# @(#) iptables.sh - Script for configuring firewall with iptables
# Based on: http://centossrv.com/
#
# Configuration part
#
##############################
## Set external interface
@diegosparente
diegosparente / Response.php
Created December 12, 2021 23:47 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@diegosparente
diegosparente / README.md
Created October 9, 2021 19:08 — forked from rubencaro/README.md
Python installation guide

Python installation guide

These are my notes, not a generic solution. They are not meant to work anywhere outside my machines. Update version numbers to whatever are the current ones while you do this.

Install asdf and its python plugin, then install Python

asdf lives in https://github.com/asdf-vm/asdf

Follow its installation instructions, which at the moment of writing were:

@diegosparente
diegosparente / kitty.conf
Created May 30, 2021 15:05 — forked from maxdevjs/kitty.conf
Kitty terminal - one dark theme [~/.config/kitty/kitty.conf]
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
#: Fonts {{{
#: kitty has very powerful font management. You can configure
#: individual font faces and even specify special fonts for particular
#: characters.
font_family Fira Code
# bold_font auto
@diegosparente
diegosparente / sshPemKey.md
Created September 15, 2020 13:34 — forked from rxm/sshPemKey.md
Create an SSH key in PEM format

Create an SSH key in PEM format

I have not been able to use ssh-keygen -e to reliably generate a private key for SSH in PEM format. This format is sometimes used by commercial products. Instead, I had to convert the key using openssl.

# generate an RSA key of size 2048 bits
ssh-keygen -t rsa -b 2048 -f jabba -C 'ronnie-jabba'

# copy key to 10.1.56.50 and add to authorized_keys
@diegosparente
diegosparente / generate-ssh-key.sh
Created September 15, 2020 12:14 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@diegosparente
diegosparente / Laravel-Permissions.sh
Created May 19, 2020 19:02 — forked from allysonsilva/Laravel-Permissions.sh
⚡️ Laravel Permissions
## Optional: if you've been playing around with permissions consider resetting all files and directories to the default.
sudo find ./ -type d -exec chmod 755 {} \;
sudo find ./ -type f -exec chmod 644 {} \;
## Give users part of the laravel group the standard RW and RWX permissions for the existing files and folders respectively.
sudo find ./storage -type d -exec chmod 775 {} \;
sudo find ./bootstrap/cache -type d -exec chmod 775 {} \;
sudo find ./storage -type f -exec chmod 664 {} \;
sudo find ./bootstrap/cache -type f -exec chmod 664 {} \;