Skip to content

Instantly share code, notes, and snippets.

@trbsi
trbsi / run.sh
Created Oct 23, 2020 — forked from nailton/run.sh
RUN composer install in hostgator with php 7.1
View run.sh
/opt/php71/bin/php /opt/cpanel/composer/bin/composer install
View make-cert.bat
@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 365 -out %domain%\server.crt
echo.
echo -----
View cert.conf
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@trbsi
trbsi / User.php
Last active Aug 14, 2018
Entity Listener example
View User.php
/**
* @ORM\EntityListeners({"Domena\UserBundle\Listener\UserListener"})
*/
class User extends AbstractUser implements UserSecurityInterface
{}
View Moving project from live to local.md
View Set Up Git On Server.md

(this is you connecting to your remote server)

ssh username@xxx.xxx.xxx.xxx

(this gets you to the 'absolute root' of the server)

cd ../

(navigate to the directory one level above your website directory - e.g. your website directory being where you would upload your HTML files etc)

@trbsi
trbsi / PushNotifications.php
Last active Mar 11, 2018 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
View PushNotifications.php
<?php
// Server file
class PushNotifications
{
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAXXXXX-XXXXXJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.