Skip to content

Instantly share code, notes, and snippets.

View anovsiradj's full-sized avatar

MDMCDC anovsiradj

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{{ $pageTitle }}}</title>
<!-- Bootstrap -->
<link href="../assets/bootstrap/css/bootstrap.css" rel="stylesheet">
@Majkl578
Majkl578 / gist:2304479
Created April 4, 2012 18:25
Tiny php script to generate simple directory index.
#!/usr/local/bin/php
<?php
/**
* @author Michael Moravec
*/
$targetDir = $argc > 1 ? $argv[1] : getcwd();
if (!is_dir($targetDir)) throw new \InvalidArgumentException("Invalid dir '$targetDir'.");
@steveosoule
steveosoule / _.debounce.js
Created October 31, 2014 18:52
Javascript Standalone Underscore's Debounce
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
var debounce = function(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
var later = function() {
timeout = null;
@RaduW
RaduW / DataTable Reload.md
Last active July 26, 2018 02:55
Testing dataTables reloading ( I need to completely change the structure, content and also columns).

Datatables reloading

( changing the content and the column structure).

Unfortunately I couldn't find a way to do it in one go. There is the table.fnDestroy(true); but this removes the <table> element from the page as well. We could use this but then we need to wrap the table element in a div in order to have a place where to recreate the table.

anonymous
anonymous / overpass.geojson
Created April 26, 2017 05:21
data exported by overpass turbo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
state region pop SATV SATM percent dollars pay
AL ESC 4041 470 514 8 3.648 27
AK PAC 550 438 476 42 7.887 43
AZ MTN 3665 445 497 25 4.231 30
AR WSC 2351 470 511 6 3.334 23
CA PAC 29760 419 484 45 4.826 39
CO MTN 3294 456 513 28 4.809 31
CT NE 3287 430 471 74 7.914 43
DE SA 666 433 470 58 6.016 35
DC SA 607 409 441 68 8.21 39
@ohryan
ohryan / responsive-align.less
Last active April 30, 2019 17:27
Bootstrap 3 Responsive Text Align
.text-xs-left { text-align: left; }
.text-xs-right { text-align: right; }
.text-xs-center { text-align: center; }
.text-xs-justify { text-align: justify; }
@media (min-width: @screen-sm-min) {
.text-sm-left { text-align: left; }
.text-sm-right { text-align: right; }
.text-sm-center { text-align: center; }
.text-sm-justify { text-align: justify; }
@Integralist
Integralist / cancelAJAX.js
Created November 3, 2011 11:17
Try to cancel all jQuery AJAX requests currently running
$.xhrPool = [];
$.xhrPool.abortAll = function() {
/* Original example used _underscore api
_.each(this, function(jqXHR) {
jqXHR.abort();
});
*/
$.each(this, function(jqXHR) {
jqXHR.abort();
@aaronpk
aaronpk / canonical.php
Created December 20, 2016 01:47
Given an input URL, find the canonical URL after following redirects and looking at rel=canonical
<?php
if(!isset($_GET['url'])) {
?>
<form action="" method="get">
<input type="url" name="url">
<input type="submit" value="Go">
</form>
<?
die();
}
@milanaryal
milanaryal / Google Blogger Social Meta Tags.html
Last active March 22, 2020 14:27
Google Blogger/BlogSpot Social Meta Tags for Facebook, Twitter, Google+, Pinterest [v1.0]
<!-- add the following code in the head tag -->
<head prefix='og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#'>
<!-- Share Image -->
<link href='YOUR_LOGO_IMAGE' rel='image_src'/>
<!-- Open Graph Meta Tags -->
<b:if cond='data:blog.pageType != &quot;index&quot;'>
<meta expr:content='data:blog.title' property='og:site_name'/>