Skip to content

Instantly share code, notes, and snippets.

💭
Sul pezzo

Artur arturmamedov

💭
Sul pezzo
Block or report user

Report or block arturmamedov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@withArtur
withArtur / bootstrap4-media-breakpoints.css
Last active May 6, 2019
Bootstrap 4 all media query breakpoints (xs,sm,md,lg,xl) up to, down from, only and betwewn
View bootstrap4-media-breakpoints.css
/**
* Bootstrap 4 all media queries #wMQ
* up > sm, md, lg, xl
* down < sm, md, lg
* only = xs, sm, lg, xl
* between <> sm-lg, sm-xl, md-xl
*/
/* .xs = | Extra Small devices only (portrait phones) less than 576px */
@LucaRosaldi
LucaRosaldi / Arr.php
Last active Jan 14, 2019
PHP: Array support class and functions
View Arr.php
<?php
/**
* Support class for working with arrays.
*/
class Arr
{
/**
* Extend an associative array.
*
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active Aug 15, 2019
Guide to configure SSL in XAMPP for Windows
View SSLXampp.md

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@leolweb
leolweb / wordpress_low-quality-image-placeholders_lqip.md
Last active Aug 6, 2019
How to easily generate low quality image placeholders (lqip) in WordPress
View wordpress_low-quality-image-placeholders_lqip.md

How to easily generate low quality image placeholders (lqip) in WordPress

I have made this function using the WP_Image_Editor class and I have filtered through the "wp_generate_attachment_metadata" hook. You can modify the "theme" namespace into function names with your theme name or in anyway you like.

Applying the filter directly to wp_generate_attachment_metadata the image placeholders are auto added into WordPress metadata, so when your add/modify/delete an image (or regenerate it via a plugin), it accomplishes to modify also to the image placeholders.

The use of the native theme support can prevent the generation of lqip or target specific image sizes to generate.

It contains an hook filter lqip_quality to modify the quality without have to modify the function.

View keypressAction.js
;(function ( $, window, document, undefined ) {
var pluginName = "keypressAction",
defaults = {};
// The actual plugin constructor
function keypressAction ( element, options ) {
this.element = element;
this.settings = $.extend( {}, defaults, options );
this._defaults = defaults;
this._name = pluginName;
@sgelbart
sgelbart / LaravelEasyGlobalScope.php
Last active Sep 22, 2016
Any easy implementation for laravel in-model global scopes (basic testing in Laravel 4.2)
View LaravelEasyGlobalScope.php
<?php
//USAGE
//in your model
public function scopeGlobal($query)
{
//todo: there may be a bug where you can't use nested wheres..try with ->where(function($query){return MyModel::noEasyGlobal();}
return MyModel::noEasyGlobal()->where('is_published',1); //replace this with whatever criteria you ahve
@ronbeltran
ronbeltran / sugar7_ubuntu_12.04_install.md
Created Jun 22, 2015
Install Sugar 7 CRM in Ubuntu 12.04
View sugar7_ubuntu_12.04_install.md
@purtuga
purtuga / grunt.copy.includeFile.js
Last active Jun 14, 2019
A Grunt Copy process function to embed content of files into other files.
View grunt.copy.includeFile.js
/**
* includeFile() - embeds a file content within another. Meant to be
* used from the copy task as a 'processContent' function. The following
* tokens can be used in files: <br>
*
* - BUILD_INCLUDE('file')
* - /* BUILD_INCLUDE('file') *\x47
* - &lt;!-- BUILD_INCLUDE("file") --&gt;
*
* In addition, options can be added to the token above that further
View detectmobilebrowser.js
/**
* jQuery.browser.mobile (http://detectmobilebrowser.com/)
*
* jQuery.browser.mobile will be true if the browser is a mobile device
*
**/
(function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|
You can’t perform that action at this time.