Skip to content

Instantly share code, notes, and snippets.

View arturmamedov's full-sized avatar
💭
Sul pezzo

Artur arturmamedov

💭
Sul pezzo
View GitHub Profile
@ImtiazEpu
ImtiazEpu / .gitignore
Created November 6, 2019 07:41
.gitignore file for WordPress & PhpStorm
# Created by https://www.gitignore.io/api/phpstorm,wordpress
# Edit at https://www.gitignore.io/?templates=phpstorm,wordpress
### PhpStorm ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
@withArtur
withArtur / bootstrap4-media-breakpoints.css
Last active May 6, 2019 09:55
Bootstrap 4 all media query breakpoints (xs,sm,md,lg,xl) up to, down from, only and betwewn
/**
* 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 */
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active January 20, 2024 23:35
Guide to configure SSL in XAMPP for Windows

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
@ctlcltd
ctlcltd / wordpress_low-quality-image-placeholders_lqip.md
Last active June 22, 2023 20:08
How to easily generate low quality image placeholders (lqip) in WordPress

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.

@zach2825
zach2825 / keypressAction.js
Created September 30, 2015 18:07
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 September 22, 2016 09:55
Any easy implementation for laravel in-model global scopes (basic testing in Laravel 4.2)
<?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 June 22, 2015 05:47
Install Sugar 7 CRM in Ubuntu 12.04
@JaviLorbada
JaviLorbada / FRP iOS Learning resources.md
Last active April 8, 2024 18:07
The best FRP iOS resources.

Videos

@purtuga
purtuga / grunt.copy.includeFile.js
Last active June 14, 2019 13:11
A Grunt Copy process function to embed content of files into other files.
/**
* 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
/**
* 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|