Skip to content

Instantly share code, notes, and snippets.

View mfd's full-sized avatar

Kami mfd

  • Checkmagush
View GitHub Profile
@mfd
mfd / modal.js
Created July 28, 2016 12:51 — forked from navdeepsingh/modal.js
Load Dynamic (AJAX) modal in Bootstrap 3, remove from DOM after timeout
$('[data-toggle="modal"]').click(function () {
var url = $(this).attr('href');
$.get(url, function (data) {
var modal = $('<div id="clue-modal" class="modal fade" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content">' + data + '</div></div></div>').modal();
modal.on("hidden.bs.modal", function () {
$(this).remove();
});
setTimeout(function(){
modal.modal('hide');
},5000);
@dsadhanala
dsadhanala / Jade: Table iteration
Last active August 9, 2016 19:20
Jade Snippet: Table iterator
//- compile and see the output online at below URL
http://jade-lang.com/
//- table data
- var tableData = [['R1 Col1', 'R1 Col2', 'R1 Col3'], ['R2 Col1', 'R2 Col2', 'R2 Col3'], ['R3 Col1', 'R3 Col2', 'R3 Col3'], ['R4 Col1', 'R4 Col2', 'R4 Col3'], ['R5 Col1', 'R5 Col2', 'R5 Col3']]
//- table markup
table.table
//- table head
tr.t-head
@orlovmax
orlovmax / Less BEM-styled selectors
Last active November 21, 2016 12:48
Less/Scss trick to generate BEM-styled selectors
Less css trick to generate BEM-styled selectors, by Max Shirsin, http://noteskeeper.ru/1139 + Scss version
@block: ~".dm-import-feed";
@{block} {
&_step_2 {
@{block}__page_step_2 {
display: block;
}
}
@cheets
cheets / pom.xml
Created June 12, 2014 10:38
Using rubygems to compile compass/sass with maven
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.arcusys</groupId>
<artifactId>theme</artifactId>
<packaging>war</packaging>
<name>theme Theme</name>
<version>1.0-SNAPSHOT</version>
@mikepenz
mikepenz / debianessentials.md
Last active February 2, 2017 10:08
Install & Configure Debian Essentials

#ABOUT

#INSTALLATION Run following commands:

apt-get install curl -y
curl https://gist.githubusercontent.com/mikepenz/bea8ef149c4c04917f04/raw/7fded476f46b156e3bc3cb8b0696fa27267c6b78/debianessentials.sh | sh;
@jerry4
jerry4 / simpleCookies.js
Created December 12, 2014 21:31
Vanilla js to get cookies
// from stackoverflow: http://stackoverflow.com/questions/5639346/shortest-function-for-reading-a-cookie-in-javascript
(function(){
var cookies;
function readCookie(name,c,C,i){
if(cookies){ return cookies[name]; }
c = document.cookie.split('; ');
cookies = {};
@dalekunce
dalekunce / mapillary_setup.md
Last active May 13, 2017 09:57
Mapillary Setup and Tools

#merge gpx files

gpsbabel -i gpx -f file1.gpx -f file2.gpx -o gpx -F merged.gpx

#attach GPX to photo get needed libs first

pip install gpxpy
brew install pyexiv2 exiftool
git clone https://github.com/mapillary/mapillary_tools.git
python geotag_from_gpx.py path/to/photos gpx_track.gpx timeoffset
@rjmoggach
rjmoggach / responsive-margins.less
Last active August 30, 2017 00:47
Responsive Margin & Padding Shortcuts for Twitter Bootstrap Using LESS CSS
//
// Responsive Margin & Padding Shortcuts for Twitter Bootstrap 3.0
// ---------------------------------------------------------------
// This is an addition to Twitter Bootstrap that allows additional margin and padding shortcuts
// for enhanced layout control purposes. It should be included after the bootstrap.less
// import statement or precompiled as you see fit. It differs from bootstrap standards in
// that for any given screen size it predetermines the margin/padding size. All you have to
// do is specify the size you want xs,sm,md,lg, or xl. The exception is for items that you
// want to be centered using auto left/right margins. This can be device responsive by
// specifying mc-xs, mc-sm, mc-md, or mc-lg depending on when you want that behavior.
@davilera
davilera / 00-readme.md
Last active November 14, 2017 12:43
Vanilla JavaScript VS libraries

Some examples of the things one can do with Vanilla JavaScript. Comparison of Vanilla JS to jQuery and Underscore.js.

@ProgerXP
ProgerXP / magrabx.php
Last active September 6, 2018 08:43
Map grabber :: Yandex.Maps + jQuery + PHP/DOMDocument/XPathby Proger_XP :: http://proger.meOriginal article (Russian): http://habrahabr.ru/post/184334/
<?php
// Map grabber :: Yandex.Maps + jQuery + PHP/DOMDocument/XPath
// by Proger_XP :: http://proger.me
// Original article (Russian): http://habrahabr.ru/post/184334/
// In public domain. I appreciate backlinks.
function dl($url) {
require_once 'sqobot/lib/downwind.php';
return new Downwind($url, array(