Skip to content

Instantly share code, notes, and snippets.

@sen0rxol0
sen0rxol0 / cheatsheet-git.sh
Created February 13, 2019 09:05 — forked from raineorshine/cheatsheet-git.sh
Cheatsheet: git commands
# adding and committing
git add -A # stages All
git add . # stages new and modified, without deleted
git add -u # stages modified and deleted, without new
git commit --amend # Add staged changes to previous commit. Do not use if commit has been pushed.
git commit --amend --no-edit # Do so without having to edit the commit message.
# remotes - pushing, pulling, and tracking
git fetch # gets remote objects and refs. Needed if new branches were added on the remote.
git remote -v # Lists all remotes (verbose)
@sen0rxol0
sen0rxol0 / http2_apache2.md
Last active February 12, 2019 22:35
http2 apache2 on ubuntu/debian
@sen0rxol0
sen0rxol0 / php.ini
Created December 21, 2018 09:26
PHP ini base
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@sen0rxol0
sen0rxol0 / php.ini
Created December 13, 2018 19:28
prestashop expecific php.ini file
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@sen0rxol0
sen0rxol0 / sendmail.txt
Last active March 7, 2021 15:10
sendmail installation
whereis sendmail
// if path not found
sudo apt-get install sendmail
// make sure this is set
nano /etc/hosts
127.0.0.1 localhost localhost.localdomain
// Run the sendmail config and answer ‘Y’ to everything:
sudo sendmailconfig
@sen0rxol0
sen0rxol0 / sysadmin.md
Last active March 7, 2021 15:11
Linux sys admininstration tasks

System Configuration And Hardware Information

  uname -a
  
  lsb_release -a
  
  top
  
 #change folders/files ownership
{* Structured Data Json - LD Microdata for Prestashop 1.6.X & 1.7
*
* Add this code in your smarty global.tpl/header.tpl file to show Organization, WebPage, Website and Product Microdata in ld+json format.
* Requires Prestashop 'productcomments' module for review stars ratings.
* by Ruben Divall @rubendivall http://www.rubendivall.com
* Module by @atomiksoft: https://addons.prestashop.com/en/seo-natural-search-engine-optimization/24511-microformats-in-ldjson.html
*}
<script type="application/ld+json">
{
"@context" : "http://schema.org",
@sen0rxol0
sen0rxol0 / phpscs.md
Last active November 15, 2018 09:32
PHP Security Cheat Sheet for Sys Admins
@sen0rxol0
sen0rxol0 / clearfix.css
Last active November 14, 2018 15:04
Clearfix Hack snippet
/**
CSS clearfix
The problem happens when a floated element is within a container box, that element does not automatically force the container’s height adjust to the floated element. When an element is floated, its parent no longer contains it because the float is removed from the flow. You can use 2 methods to fix it:
{clear: both;}
clearfix
Once you understand what is happening, use the method below to “clearfix” it.
@sen0rxol0
sen0rxol0 / Makefile
Created October 18, 2018 21:36 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.