Skip to content

Instantly share code, notes, and snippets.

View vincentamari's full-sized avatar

Vincent vincentamari

  • Business Foresights Ltd
View GitHub Profile
@patpawlowski
patpawlowski / sugarbackupdownload.php
Last active June 30, 2017 03:54
PHP Script to download Sugar backups from the pbs_Backups module
<?php
/**
* Created by NetBeans.
* User: patpawlowski
* Date: Mar 3, 2017 at 3:25:54 PM <- My 51st birthday ;) -pat
* File: sugarbackupdownload.php
* Create: curl https://gist.github.com/patpawlowski/486ea6d6b84bb6b7e90c5474ae5f001c/raw/ce08c191c8b3656d8749ef15c446b706a786b02b/sugarbackupdownload.php > sugarbackupdownload
* Make Executable: chmod +xxx sugarbackupdownload
* Run: php sugarbackupdownload
@jcamp
jcamp / divi-desktop-menu.css
Last active March 1, 2020 10:49
DIVI Theme - Use mobile menu on desktop #divi
/* If you don’t want to clutter up your header bar with too many links, you can always choose to emulate what mobile
displays do: use a toggle to display a navigation menu.
Divi actually does this when being browsed from a mobile device, and the code below simply makes this toggle
button accessible when your site is being viewed from a PC. This way you can keep your header looking uncluttered.
*/
@media only screen and ( min-width:980px ) {
#et_mobile_nav_menu { display:block }
#top-menu-nav { display:none; }
@Garconis
Garconis / divi-mobile-submenu-toggles.css
Last active April 3, 2023 10:02
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* -- HEADER -- */
/* remove pointer event from menu module mobile wrapper */
.et_pb_module.et_pb_menu .et_mobile_nav_menu {
pointer-events: none;
}
/* make menu module hamburger icon and menu links interactive again */
.et_pb_module.et_pb_menu .et_mobile_nav_menu .mobile_menu_bar,
.et_pb_module.et_pb_menu .et_mobile_nav_menu .et_mobile_menu li a {
@karlingen
karlingen / switch_user.php
Last active April 23, 2021 15:17
SugarCRM user switching / login as another user
<?php
/**
* Login as another user in SugarCRM and switch back to admin user
*
* Simply put this file into a custom entry point file and
* browse to it with the parameters 'user_name' or 'back_to_sudo'
*
* Usage:
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&user_name=mylittlepony
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&back_to_sudo=1
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@jaywilliams
jaywilliams / csv_to_array.php
Created April 30, 2010 23:18
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array