Skip to content

Instantly share code, notes, and snippets.

View davdenic's full-sized avatar

David Denicolò davdenic

View GitHub Profile
@davdenic
davdenic / install-wget2
Created January 20, 2021 09:08
Install wget2 on macos
brew install automake gettext lzip pkg-config xz gnutls
brew link --force gettext
./configure
make
make check
sudo make install
@davdenic
davdenic / npm-ckeditor4-basic.md
Last active May 14, 2019 06:24
retrieve ckeditor4 basic via npm

Install ckeditor 4 version basic via npm

Run in terminal

npm i ckeditor/ckeditor-releases#full/latest --save

or just add to your package.json

  "dependencies": {
@davdenic
davdenic / git Delete merged branches.md
Last active April 1, 2021 20:23
git Delete merged branches

Git delete merged branches

LOCALLY

git branch --merged | egrep -v "(master|development)" | xargs -n 1 git branch -d

Dry run

git branch --merged | egrep -v "(master|development)" | xargs -n 1 echo

@davdenic
davdenic / realurl-paginate-widget.php
Last active December 7, 2018 10:23
RealURL configure the paginate widget to have your-url-list/pagX/
'postVarSets' => array(
'_DEFAULT' => array(
//put this after controller and dateFilter...
'pag' => array(
array(
'GETvar' => 'tx_news_pi1[@widget_0][currentPage]',
//'noMatch' => 'bypass'
)
)
),
@davdenic
davdenic / realurl-encode-decode-SpURL_postProc.php
Created November 28, 2018 10:47
Remove realurl detail path
// put this two function at the begin of realurl_userconf.php file
function user_encodeSpURL_postProc(&$params, &$ref) {
// $params['URL'] = str_replace('calendar/location/tx_cal_location/location/', 'calendar/location/', $params['URL']);
// $params['URL'] = str_replace('calendar/organizer/tx_cal_organizer/organizer/', 'calendar/organizer/', $params['URL']);
@davdenic
davdenic / bootstrap-3-vertical-offset.scss
Created November 12, 2018 08:48
Bootstrap 3 vertical offset class generator
/*
Requirement: Bootstrap 3
Include this after bootstrap.css. Add class of
vert-offset-top-value or vert-offset-bottom-value
to your Bootstrap 3 default rows to prevent row content
from touching the row content above or below.
Usage:
<div class="vert-offset-top-1">
@davdenic
davdenic / CSS hover apply to parent elements.md
Last active December 17, 2022 16:50
CSS hover apply to parent elements
.parent {
    background: white;
    pointer-events: none; // this disable the hover on the .parent

    &:hover {
      background: gray; // hover applied to .parent but disabled by the previous pointer-events: none;
    }
    a {
 pointer-events: auto; // this enable the pointer again
@davdenic
davdenic / Xdebug PHPStorm DDEV Docker.md
Last active October 25, 2018 11:48
Xdebug PHPStorm DDEV Docker

in .ddev folder add a file .ddev/php/xdebug.ini with this:

xdebug.remote_host=10.254.254.254

in PHPStorm in the preferences \ PHP \ Debug \ DBGp Proxy

Host: 10.254.254.254
Port: 9000
@davdenic
davdenic / responsive-table.scss
Created October 12, 2018 08:17
responsive tables pure CSS... well SASS
/* tables responsive for smartphones */
@media only screen and (max-width: $screen-xs-max) {
//Force table to not be like tables anymore
table.table-responsive,
table.table-responsive-labels {
display: block;
thead, tbody, th, td {
display: block;
@davdenic
davdenic / ddev-typo3-console-db-import.sh
Last active October 9, 2018 07:19
DDEV TYPO3 DB remote export / local import using typo3 console
#!/usr/bin/env bash
#replace user server and your-server-www-path
USER=your-ssh-remote-user
SERVER=your-remote-server
SERVERWWWPATH=your-server-absolute-path-www-htdoc
ssh $USER@$SERVER "source ~/.profile; $SERVERWWWPATH/typo3cms database:export -e cf_* -e cache_* -e [bf]e_sessions -e sys_log -e sys_history -e sys_domain -e tx_realurl_*" | ddev exec ../typo3cms database:import && ddev exec ../typo3cms database:updateschema *