Skip to content

Instantly share code, notes, and snippets.

View samaphp's full-sized avatar
🚢
Keep shipping

Saud bin Mohammed samaphp

🚢
Keep shipping
View GitHub Profile
@samaphp
samaphp / fix.wkhtmltopdf.odoo.snippetbucket.erp.open.source.seo.sh
Created October 4, 2022 22:16 — forked from zek/fix.wkhtmltopdf.odoo.snippetbucket.erp.open.source.seo.sh
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display.
How to Fix it:
1. Remove wkhtmltopdf and related package
$ sudo apt-get remove libqt4-dev qt4-dev-tools wkhtmltopdf
$ sudo apt-get autoremove
2. Install requirement package for compiling
$ sudo apt-get install openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
@samaphp
samaphp / services.yml
Created August 26, 2019 07:31
Drupal 8 services.yml file.
parameters:
session.storage.options:
# Default ini options for sessions.
#
# Some distributions of Linux (most notably Debian) ship their PHP
# installations with garbage collection (gc) disabled. Since Drupal depends
# on PHP's garbage collection for clearing sessions, ensure that garbage
# collection occurs by using the most common settings.
# @default 1
gc_probability: 1
Verifying my Blockstack ID is secured with the address 17NeNDrj5yQV6SPbrxjxDjNHPvfwx83fGx https://explorer.blockstack.org/address/17NeNDrj5yQV6SPbrxjxDjNHPvfwx83fGx
@samaphp
samaphp / console.sol
Created April 25, 2018 07:36 — forked from maurelian/console.sol
A JS style console.log() function for solidity.
pragma solidity ^0.4.10;
// Enables event logging of the format `console.log('descriptive string', variable)`,
// without having to worry about the variable type (as long as an event has been declared for that type in the
// Console contract.
contract Console {
event LogUint(string, uint);
function log(string s , uint x) {
LogUint(s, x);
@samaphp
samaphp / ajax_form_example.module
Created January 24, 2018 07:55 — forked from pascalduez/demo.module
Drupal 7 — Basic Ajax form submit example (Ajax framework)
<?php
/**
* @file
* Demo module, Basic Ajax form submit (Ajax framework).
*/
/**
* Implements hook_menu().
*/
@samaphp
samaphp / ubuntu-arrange-monitors
Created May 23, 2017 22:56
Arrange Ubuntu monitors using commandline. This script will help you to rearrange monitor screens by command line. (BE CAREFUL the dimensions should changed to suit your monitors dimensions)
#!/usr/bin/env bash
echo "[ Start Arranging ]"
echo "==================="
xrandr --output DP-1 --mode 1920x1200 --pos 2646x0 --rotate normal --output VGA-1-1 --mode 1366x768 --pos 1280x0 --rotate normal --output VGA-2-2 --mode 1280x1024 --pos 0x0 --rotate normal
@samaphp
samaphp / Drupal Site Audit Steps.md
Created March 29, 2017 11:29 — forked from Greg-Boggs/Drupal Site Audit Steps.md
Conduct a Drupal Site Audit

Create a good backup

Put the site in version control

Create a Github copy of the code if it doesn't already exist. Start your first commit with everything exactly the way it is before you start. If the project already has git, do perserve the git history.

Backup the files and database

Name and Date the backup. Do this before you change anything. Just in case.

@samaphp
samaphp / README.md
Created March 29, 2017 11:27 — forked from Greg-Boggs/README.md
Drupal Site Building Best Practices

Better Drupal Building

  • Custom glue should be accomplished with configuration first and PHP code second.

Configuration Management and Dependencies

  • Use Composer (or Drush Make) to build your project and it's depencies.
  • Store your work in files.
  • Set your config directory above the webroot.
  • Sync UUIDs across all developers.

Theming

Keybase proof

I hereby claim:

  • I am samaphp on github.
  • I am samaphp (https://keybase.io/samaphp) on keybase.
  • I have a public key ASD7dnD2y3RTDmu6IxpNAu-s0FxjWgKupriZ9fUc6ktQzgo

To claim this, I am signing this object:

<?php
while(){
}