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
View Generate a list of timezones with PHP
http://www.php.net/manual/en/function.timezone-identifiers-list.php
<?php
// here we are in to a script php how send the variable with array to smarty
$zones = timezone_identifiers_list();
foreach ($zones as $zone)
{
$zoneExploded = explode('/', $zone); // 0 => Continent, 1 => City
@arturmamedov
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>
</label>
<span ng-show="show">
<label class="checkbox-inline">
<input type="radio" value="A" name="res_sell_type">
View gist:882184747abdbe64b6c2
/* Scroll and collapse box on view-pages of item */
var st = 51;
function updatePersistBox() {
$(".persist-area").each(function() {
var el = $(this),
offset = el.offset(),
scrollTop = $(window).scrollTop() + st,
floatingBox = $(".floatingBox", this)
// && (scrollTop < offset.top + el.height())
@arturmamedov
arturmamedov / am-bs.css
Last active Feb 1, 2019
My Custom Miscellaneous CSS style, bootstrap compattible
View am-bs.css
/* OVERWRITED */
.modal-footer {margin-top:0px;}
.center-block {
float:none;
}
/* Tables * /
.table-striped > thead > tr {
background-color: #D196A4;
@arturmamedov
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
arturmamedov / update-message-at-time.js
Created May 4, 2016
Update Messages on page at predefined time
View update-message-at-time.js
function updateMessage (){
// Message and time here. Use GMT Time (est +4)
var messages = [
['09/30/2014 21:10 GMT','Backstage: Next up Text here - @ 10 AM'],
['09/30/2014 21:12 GMT','Its 5:15'],
['09/30/2014 21:20 GMT','Its 5:20'],
['09/30/2014 21:25 GMT','Its 5:25'],
['09/30/2014 21:30 GMT','Its 5:30'],
['09/30/2014 21:35 GMT','Its 5:35'],
['09/30/2014 21:40 GMT','Its 5:40']
@arturmamedov
arturmamedov / laravel_log_daily_email_ip_conf.php
Last active Feb 1, 2019 — forked from reedmaniac/Laravel Logging - Customization
Laravel Logger configuration for Daily logs, Email send on Warning Level, and optionally (comment out and add on setFormatter()) HTML Formater
View laravel_log_daily_email_ip_conf.php
<?php
// Put at the top of ./config/app.php
// Custom Monolog Configuration - https://laravel.com/docs/5.2/errors#configuration
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Illuminate\Mail\TransportManager;
$app->configureMonologUsing(function($monolog) use ($app) {
@arturmamedov
arturmamedov / instagram_api.php
Created Jun 15, 2016
Instagram API retrive access token with PHP curl
View instagram_api.php
<?php
// yo can follow this guide to http://www.benrlodge.com/blog/post/how-to-generate-an-instagram-access-token#
#1 first you need to create a Client in Instgram Developer Dashboard
// https://www.instagram.com/developer/clients/manage/
#2 after you need to retrive a oAuth code for after get access_token
// https://www.instagram.com/developer/authentication/
// change the params with your one and open link in browser
View my-instagram-media.json
{"status": "ok", "items": [{"can_delete_comments": true, "code": "BGblVpbMyQkwm9MIUTWkdt9NCAuA37E28zSfi80", "location": null, "images": {"low_resolution": {"url": "https://scontent-mxp1-1.cdninstagram.com/t51.2885-15/s320x320/e15/13414404_1189485784417346_573008309_n.jpg?ig_cache_key=MTI2ODc3MTkzNTM0NDYwMDEwMA%3D%3D.2", "width": 320, "height": 320}, "thumbnail": {"url": "https://scontent-mxp1-1.cdninstagram.com/t51.2885-15/s150x150/e15/13414404_1189485784417346_573008309_n.jpg?ig_cache_key=MTI2ODc3MTkzNTM0NDYwMDEwMA%3D%3D.2", "width": 150, "height": 150}, "standard_resolution": {"url": "https://scontent-mxp1-1.cdninstagram.com/t51.2885-15/e15/13414404_1189485784417346_573008309_n.jpg?ig_cache_key=MTI2ODc3MTkzNTM0NDYwMDEwMA%3D%3D.2", "width": 612, "height": 612}}, "can_view_comments": true, "comments": {"count": 0, "data": []}, "alt_media_url": null, "caption": {"created_time": "1465469422", "text": "#putanesca puttana che esca", "from": {"username": "imartur", "profile_picture": "https://scontent-mxp1-1.cdnin
@arturmamedov
arturmamedov / BSIT-gMaps.html
Last active Nov 15, 2017
gMaps - Implementations
View BSIT-gMaps.html
<!--
https://developers.google.com/maps/documentation/javascript/examples/infowindow-simple#try-it-yourself
http://hpneo.github.io/gmaps/
-->
<script src="//maps.google.com/maps/api/js?sensor=true" type="text/javascript"></script>
<script src="/bower_components/gmaps/gmaps.js" type="text/javascript"></script>
<script type="text/javascript">
/** GOOGLE MAPS **/
INSPIRO.maps = function () {
You can’t perform that action at this time.