Skip to content

Instantly share code, notes, and snippets.

View michaeldeboeve's full-sized avatar

Michael de Boevé michaeldeboeve

View GitHub Profile
@michaeldeboeve
michaeldeboeve / jQuery stop animation on scroll.js
Last active September 7, 2020 12:51
jQuery: Stop animation when user scrolls
$(window).on('mousewheel', function() {
$('html, body').stop();
});
@michaeldeboeve
michaeldeboeve / jade-variable-lang-attr
Last active December 27, 2015 11:49
Jade: Conditional HTML for Intern,et Explorer with variable language attribute
//---------------------------------------------------------
//- IE conditional statements
//---------------------------------------------------------
- var lang = 'nl'
!= '<!-- [if IEMobile 7 ]> '
!= '<html lang="'+lang+'" class="no-js iem7">'
!= '<![endif] -->'
!= '\n'
@michaeldeboeve
michaeldeboeve / Wordpress remove scripts from parent theme.php
Last active January 30, 2020 11:40
Wordpress remove scripts from parent theme
function remove_scripts() {
wp_dequeue_script( 'script-name' );
}
function remove_styles() {
wp_dequeue_style( 'style-name' );
}
add_action( 'wp_print_scripts', 'remove_scripts' );
add_action( 'wp_print_styles', 'remove_styles' );
@michaeldeboeve
michaeldeboeve / README.md
Created May 16, 2016 10:09 — forked from jonathantneal/README.md
Practical ARIA Tabs: Creating fully accessible tabs

Practical ARIA Tabs

This is a small guide to marking up fully accessible tabs. Consider using PostHTML ARIA Tabs as a practical solution.

The Rules

  1. Add tablist role to the <ul> to indicate it contains tabs.
  2. Add presentation role to each <li> to bypass its list item state.
  3. Add tab role to each <a> to incidate it is an actual tab.
  4. Add href and aria-controls to each <a> to reference its tab panel.
@michaeldeboeve
michaeldeboeve / angular-json.js
Last active June 22, 2017 11:33
Load .json file in angular
$http.get('/path/to/myfile.json')
.then(function(response){
$scope.myResult = response.data;
});
@michaeldeboeve
michaeldeboeve / angular-php.js
Last active June 22, 2017 12:04
Load .php file in angular
$http.get('/path/to/ami.php')
.then(function(response){
$scope.myResult = response.data;
});
@michaeldeboeve
michaeldeboeve / api-msql-php-angular.php
Last active June 22, 2017 11:44
mySQL db connect for use in Angular
// api.php
<?php
// Connect to the Database
include 'db_connect.php';
// Query from Database
include 'db_main_query.php';
// Insert into the Database
// include 'db_insert.php';
@michaeldeboeve
michaeldeboeve / related-tables-query.sql
Created June 22, 2017 11:55
mySQL query related tables
@michaeldeboeve
michaeldeboeve / Linux Mint Hibernation.sh
Last active April 16, 2018 20:20
Disable/Restore Hibernation on Linux Mint
# Disable
# With that, you've moved the settings file that enables hibernation, to the main directory / (root). Thus rendering it ineffective. The new location is a safe storage, from which you can retrieve it again, should you ever wish to restore hibernation.
sudo mv -v /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla /
# Restore
sudo mv -v /com.ubuntu.enable-hibernate.pkla /etc/polkit-1/localauthority/50-local.d
@michaeldeboeve
michaeldeboeve / Linux Mint Remove redundant packages.sh
Last active April 16, 2018 20:18
Stuff to do after Linux Mint Install
sudo apt-get remove mono-runtime-common gnome-orca virtualbox-guest*