Skip to content

Instantly share code, notes, and snippets.

View mungurs's full-sized avatar

Mārtiņš Ungurs mungurs

  • Latvia
View GitHub Profile
We couldn’t find that file to show.
@mungurs
mungurs / SassMeister-input-HTML.html
Created January 27, 2016 09:56
Generated by SassMeister.com.
<div class=“content-box”>
<div class=“content-box__links”>
<ul class=“content-box__links-ul”>
<li class=“content-box__links-li”>
<a class=“content-box__links-a”>link</a>
</li>
</ul>
</div>
</div>
@mungurs
mungurs / SassMeister-input-HTML.html
Last active January 27, 2016 11:22
Generated by SassMeister.com.
<div class=“content-box”>
<div class="content-box__main">
<h1 class="content-box__main-heading">Title</h1>
<p class="content-box__main-text">Text</p>
</div>
<div class=“content-box__links”>
<ul class=“content-box__links-ul”>
<li class=“content-box__links-li”>
<a class=“content-box__links-a”>link</a>
<a class=“content-box__links-a”>link</a>
@mungurs
mungurs / formSaver-clear.js
Created October 14, 2016 14:06 — forked from aarongustafson/formSaver-clear.js
Saves form data to `localStorage`
if ( window.localStorageAvailable )
{
window.localStorage.removeItem( 'FORM URL GOES HERE' );
}
@mungurs
mungurs / gist:495e5788c00c29c959a5a95b59b9c7fb
Created November 16, 2016 10:51 — forked from dirx/gist:60414eb80da9c7dbfb19
Convert multiple array() to new php 5.4 style [] in code with phpstorm
Search regexp: \barray\(([^\(]*?)\)
Replace with: [$1]
Search & replace until it´s done.
Does not work if ( is in array keys or values.
@mungurs
mungurs / leafFileSync.php
Created December 14, 2016 11:55
elFinder file sync. with db
<?php
class leafFileSync{
private $enableLog = false;
public function __construct($logSynchronization = false){
$this->enableLog = $logSynchronization;
}
public function sync($cmd, $result, $args, elFinder $elFinder, elFinderVolumeDriver $volume){
<?php
class fileManagerFacade {
private $fileSync = null;
private $elFinder = null;
private $connector = null;
private $rootDirName = 'files-manager';
private $visibleFileTypes = [];
<?
class leafFile extends leafBaseObject
{
const tableName = 'leafFiles';
const defaultFolderMode = 0775; // rwx rwx r-x
const defaultFileMode = 0666; // rw- rw- rw-
const inputFieldSuffix = '_hash';
@mungurs
mungurs / wp-admin bar CSS fix
Created May 10, 2017 14:50 — forked from KnightAlex/wp-admin bar CSS fix
CSS fix for wp-admin bar, for when body has relative positioning
@media (max-width: 600px) {
html #wpadminbar{top:-46px} /* wp admin bar fix, due to slide-push menu putting a relative position on the body element */
}
@mungurs
mungurs / google_calendar.css
Created July 3, 2017 11:30 — forked from dawoodman71/google_calendar.css
PHP Solution for adding a Google Calendar, injecting styles and changing options dynamically.
.dp-cur, .chip dt, .te, .te-t, .te-rev-s, .rb-n, .rb-i, .agenda, .event-title{
white-space:normal !important;
}
#calendarTitle,
.tab-name,
img[title="Print my calendar (shows preview)"],
.footer img,
.details .links a:last-child,
.event-links a:last-child