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
arturmamedov / w-global-tools.js
Last active Feb 24, 2020
Tools that change global behavior of website things, for not deal with a lot of changes for a little thing
View w-global-tools.js
In example make all images of website content (maybe insterted trough editor)
openable trough gallery
[this work with Blueimp Gallery]
$(".page-content img").each(function(){
// for possibility to disable this on some elements
if (!$(this).hasClass('no-auto-gallery')) {
// create data-gallery (if there aren't an <a> tag over image, create it)
if (!$(this).parent().hasClass('blog_img') && !$(this).parent().is('a')) {
arturmamedov / instagram_api.php
Created Jun 15, 2016
Instagram API retrive access token with PHP curl
View instagram_api.php
// yo can follow this guide to
#1 first you need to create a Client in Instgram Developer Dashboard
#2 after you need to retrive a oAuth code for after get access_token
// change the params with your one and open link in browser
arturmamedov / on_before_unload.js
Last active Jul 9, 2019
Window on before unload - for stop user to escape page before all data is not saved or an action not performed
View on_before_unload.js
// Message to be displayed on unload
var message = $('#jtrnslt #leavemess').text(), submitting = false;
// On Form submition set submitting to true for not fire onbeforeunload
$(document).on("submit", "form", function(event){
submitting = true;
// Window onbeforeunload fired when leave page but not if it a form submition or element with .noBeforeUnload class
window.onbeforeunload = function (e) {
e = e || window.event;
// Determine if you want to allow unload
arturmamedov / withAlert.js
Last active Jul 9, 2019
Show bootstrap 3/4 alerts like notifications or whatever you want simply by call `withAlert('message', 'type')`
View withAlert.js
* withAlert()
* @dependencies [css: bootstrap(.alert), withstyle(.withAlert), jquery]
* @param string message
* @param string type warning|success|danger|primary|secondary|info
* @param object options {autohide: true/false, hidetime: 6000, placement: top|bottom}
function withAlert(message, type, options) {
arturmamedov / w-whatsapp.js
Created May 16, 2019
WhatsApp Api on Mobile and Desktop
View w-whatsapp.js
* Replace mobile URL of WhatsApp with Desktop
* The mobile first strategy is used cause most people decide to not show WhatsApp on Desktop but only on mobile where it is very useful
* @dependencies [ core/w-ismobile.js ]
if(withOptions.whatsappWeb && ! && $(".whatsapp-weburl").length > 0){
clog('WhatsApp Enabled and Present');
arturmamedov / bootstrap4-media-breakpoints.css
Created May 6, 2019 — forked from withArtur/bootstrap4-media-breakpoints.css
Bootstrap 4 all media query breakpoints (xs,sm,md,lg,xl) up to, down from, only
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 */
View traffic_sources_cookies.js
// configuration
var $hostname = '.sviluppo1.loc',
cookie_params = ['source', 'medium', 'campaign']; // there are also [... 'term', 'content'] !commented
function crumbleCookie(a) {
for (var d = document.cookie.split(";"), c = {}, b = 0; b < d.length; b++) {
var e = d[b].substring(0, d[b].indexOf("=")).trim(),
i = d[b].substring(d[b].indexOf("=") + 1, d[b].length).trim();
c[e] = i;
arturmamedov / AJS-jQ_showhide.html
Last active Apr 9, 2019
AngularJS show /hide VS jQuery show/hide.
View AJS-jQ_showhide.html
<!-- AngularJS ng-show and ng-click -->
<div class="checkbox">
<label ng-click="show = !show">
<input type="radio" name="cat_id" value="1">
<strong>Residenziale</strong> Immobili in vendita oppure in affitto<br>
<span ng-show="show">
<label class="checkbox-inline">
<input type="radio" value="A" name="res_sell_type">
arturmamedov / merge_options.php
Last active Feb 12, 2019
Merge $defaults with custom passed $options
View merge_options.php
* spesso abbiamo bisogno di parametri default obbligatori
* ma che possono essere sovrascritti con quelli custom passati alla funzione ad ogni chiamata
* ... la suluzione in 4 righe e' questa
* ---
* [EN] often we need a mandatory options parameters that can be overriden by custom params passed each time
* the solution is here in 4 rows of code
arturmamedov / am-bs.css
Last active Feb 1, 2019
My Custom Miscellaneous CSS style, bootstrap compattible
View am-bs.css
.modal-footer {margin-top:0px;}
.center-block {
/* Tables * /
.table-striped > thead > tr {
background-color: #D196A4;
You can’t perform that action at this time.