Skip to content

Instantly share code, notes, and snippets.

@xeptore
xeptore / Change_php_version_ubnutu.md
Last active February 5, 2021 11:07
How to downgrade/upgrade PHP versions on Ubuntu-based linux distros

Add Repo

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade

Install PHP5.6

sudo apt-get install php5.6 php5.6-cli php5.6-common libapache2-mod-php5.6 php5.6-mysql php5.6-fpm php5.6-curl php5.6-gd php5.6-bz2 php5.6-mcrypt php5.6-json php5.6-tidy php5.6-mbstring php5.6-intl php-redis php-memcached php-gettext php-xdebug
@xeptore
xeptore / Install_dotnet_Ubuntu.md
Last active November 14, 2017 04:08
Install Donet SDK on Ubuntu

1. Add the dotnet product feed

Register the trusted Microsoft signature key:

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Register the Microsoft Product feed:

  • Ubuntu 17.10
@xeptore
xeptore / Install_SQL_Server_Ubuntu.md
Last active November 14, 2017 04:27
SQL Server installation guide on Ubuntu

Prerequisites

You must have a Ubuntu 16.04 machine with at least 3.25GB of memory.

For other system requirements, see System requirements for SQL Server on Linux.

Install SQL Server

1. Import the public repository GPG keys:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

2. Register the Microsoft SQL Server Ubuntu repository:

@xeptore
xeptore / Symfony2.8_Permissions.md
Created November 16, 2017 04:53
Symfony2.8 Directories and Files Permissions

Run these commands in your Symfony2.8 project base folder

HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1)
setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX app/cache app/logs
find ./ -type d -exec chmod 755 {} \;
find ./ -type f -exec chmod 644 {} \;

Install 32bit C++ Libraries on Ubuntu

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo dpkg --add-architecture i386
sudo apt-get install apt-file
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-file find libstdc++.so.6
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xeptore
xeptore / description.md
Last active July 27, 2018 07:13
Nodejs always running process as a linux service

Help


  • Replace with the user you want to command get executed by. to find your current user execute this command:
whoami
  • ExecStart is the command you want to get executed in the WorkingDirectory. for example assume server.js file exists in previously specified WorkingDirectory. then weyou should set ExecStart to:
@xeptore
xeptore / good_quotes.md
Last active January 22, 2021 08:12
some good and useful quotes

Know Where You Are Going

"As developers there are two ways we fail: we build the thing wrong, or we build the wrong thing." – Steve Smith

"One way to minimize the amount of bugs in an application is to maximize the number of lines of code that aren’t written."

"Everything should be made as simple as possible, but no simpler." — Albert Einstein

"Unnecessary creativity is the bane of software development. Complexity kills scaling and maintainability."

@xeptore
xeptore / symfony-useful-commands.md
Created August 21, 2018 13:29
a list of more useful symfony cli commands

Debug the Service Container & List Services

To get a list of all services (public and private) and their PHP classes:

php bin/console debug:container

To get a list of hidden services:

php bin/console debug:container --show-hidden

To show a list of all of the available types that can be used for autowiring (in case of App\Service\Mailer):

@xeptore
xeptore / .eslintrc.yml
Last active May 12, 2019 11:35
eslint configurations for Node apps with Jest
env:
es6: true
node: true
commonjs: true
jest: true
jest/globals: true
plugins:
- jest
extends:
- 'eslint:recommended'