Skip to content

Instantly share code, notes, and snippets.

View luclemo's full-sized avatar

Lucas Lemonnier luclemo

  • Ste-Justine Hospital Research Center
  • Montreal, QC
View GitHub Profile
@alexwoollam
alexwoollam / function.php
Last active March 10, 2022 00:29 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
/**
* Disables comments, Add below to existing function.php file.
*/
/** Disable support for comments and trackbacks in post types. */
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ( $post_types as $post_type ) {
if ( post_type_supports( $post_type, 'comments' ) ) {
@mjlescano
mjlescano / form-reset-helpers.scss
Last active November 30, 2022 16:08 — forked from anthonyshort/Super Form Reset.css
Reset for form elements written in SCSS
/* ----------------------------------------------------------------------------------------------------
SCSS Form Reset Helpers - Forked from: https://gist.github.com/anthonyshort/552543
Intended usage:
- MIXINS: for very specific use cases, when you dont want to reset absolutly all the forms, very verbose output.
- PLACEHOLDER SELECTORS: use as extending classes. Less verbose, more generic overrides.
A couple of things to watch out for:
@nroca
nroca / gist:511ef1d287ba7121f596
Created October 9, 2014 05:39
ACF Options Page (Icon/Position)
// http://support.advancedcustomfields.com/forums/topic/change-menu-position-of-options-page/
acf_add_options_page( array(
'page_title' => 'Home Page Sliders',
'menu_title' => 'Sliders',
'menu_slug' => 'home-page-sliders',
'capability' => 'edit_posts',
'icon_url' => 'dashicons-images-alt2',
'position' => 7
@lloc
lloc / hooks.md
Last active July 3, 2019 04:43
Hooks, filters and actions

Web Design Contract (open-source)

Between [your name] and [their name]

Summary:

You ([their name]), located at [customer address] are hiring me ([your name]) located at [company address] to [design and develop a web site] for the estimated total price of [total] as outlined in our previous correspondence.

What do both parties agree to do?

@DevinWalker
DevinWalker / Gravity-Form-Base-Styles.css
Last active February 25, 2018 14:50
Styles to help frontend development of Gravity Forms with the plugin's CSS turned off.
/* ==========================================================================
Gravity Forms
========================================================================== */
ul.gform_fields {
padding: 0;
margin: 0;
}
.gform_fields, .content .gform_fields {
@mariafromkorea
mariafromkorea / cross-browser-select-input-styles
Last active October 26, 2016 20:00
Form Element Styles
//Set global height, border, box shadow and radius for input field and selects
//Remove webkit appearance
input[type="text"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], select, .form-select:not(.chosen-container), .chosen-container .chosen-single, textarea{
-webkit-appearance:none;
/*replace these scss styles with css if needed*/
@include box-shadow(none);
@include border-radius(0px);
border-color:#ccc;
height:35px;
}
@emaildano
emaildano / acf-yoast-add-on.php
Created January 31, 2014 02:51
Add ACFs to Yoast SEO page analysis.
function add_custom_content_to_analysis( $content ) {
global $post;
$custom = get_post_custom( $post->ID );
$custom_content = '';
foreach( $custom as $field )
{
$custom_content .= $field[0].' ';
}
return $content . ' ' . $custom_content;
}
@sarahmonster
sarahmonster / db_local.sql
Last active December 19, 2015 03:19
A series of files to include in your git directory in order to automate WordpPress database syncs.
USE DBNAME_LOCAL;
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="siteurl";
UPDATE wp_EXT_options SET option_value="http://LOCALURL:8888" WHERE option_name="home";
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git