Skip to content

Instantly share code, notes, and snippets.

View dergachev's full-sized avatar

Alex Dergachev dergachev

View GitHub Profile
@dergachev
dergachev / index.html
Created November 22, 2012 06:15
Gist Embed JS hackery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
"></script>
<script src="script.js"></script>
<h2><a href="/blog/550-multiple-file-gist-improvements">Multiple file gist improvements</a></h2>
<div class="entry-content markdown-body">
<p>We've always had the ability to embed multiple file gists:</p>
@dergachev
dergachev / README.md
Created November 28, 2012 20:41
WxT Drupal Working Group meeting - Nov 15
@dergachev
dergachev / README.md
Created November 28, 2012 23:32
Dropbox Screenshot Copy URL via OS X Folder Action

This gist has been moved to its own repo! Please see https://github.com/dergachev/copy-public-url

Dropbox Screenshot Copy URL via OS X Folder Action

Overview

This gist includes a custom Folder Action Script (dropbox-copy-public-url.applescript) that copies to clipboard the public URL of any newly created file inside of ~/Dropbox/Public, and emit a Growl notification.

The installation instructions below install the script into ~/Library/Scripts/Folder\ Action\ Scripts, configure OS X to store screenshots in ~/Dropbox/Public/screenshots (instead of ~/Desktop), and configure OS X to run the script on any newly created file in that folder.

@dergachev
dergachev / app.js
Created December 17, 2012 20:34
Manual JS prettification of enterprisewiki.co. See http://news.ycombinator.com/item?id=4933049
// https://github.com/EightMedia/hammer.js/blob/master/hammer.js
function toId(t) {
return t.toLowerCase().replace(/[^a-z]/gi, "-").replace(/-+/gi, "-")
}
function toc() {
var t = $("#sidebar").html("");
$("h1,h2,h3").each(function() {
var e = $(this).clone(), n = $(this).offset().top;
"#" != e.html() && (e.is("h3") && e.html("&dash; " + e.html()), t.append(e), e.on("click", function() {
$("body").animate({scrollTop: n}, 200)
@dergachev
dergachev / app.js
Created December 17, 2012 20:34
Manual JS prettification of enterprisewiki.co. See http://news.ycombinator.com/item?id=4933049
// https://github.com/EightMedia/hammer.js/blob/master/hammer.js
function toId(t) {
return t.toLowerCase().replace(/[^a-z]/gi, "-").replace(/-+/gi, "-")
}
function toc() {
var t = $("#sidebar").html("");
$("h1,h2,h3").each(function() {
var e = $(this).clone(), n = $(this).offset().top;
"#" != e.html() && (e.is("h3") && e.html("&dash; " + e.html()), t.append(e), e.on("click", function() {
$("body").animate({scrollTop: n}, 200)
@dergachev
dergachev / app.js
Created December 17, 2012 20:36
Manual JS prettification of enterprisewiki.co. See http://news.ycombinator.com/item?id=4933049
// https://github.com/EightMedia/hammer.js/blob/master/hammer.js
function toId(t) {
return t.toLowerCase().replace(/[^a-z]/gi, "-").replace(/-+/gi, "-")
}
function toc() {
var t = $("#sidebar").html("");
$("h1,h2,h3").each(function() {
var e = $(this).clone(), n = $(this).offset().top;
"#" != e.html() && (e.is("h3") && e.html("&dash; " + e.html()), t.append(e), e.on("click", function() {
$("body").animate({scrollTop: n}, 200)
@dergachev
dergachev / index.html
Created December 17, 2012 21:12 — forked from anonymous/scratchpad.js
Source code from scratchpad.io
<!DOCTYPE html>
<html lang="en">
<head>
<!-- added by alex dergachev -->
<base href="http://scratchpad.io/">
<title>Scratchpad</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body id="scratchpad" tabindex="0">
@dergachev
dergachev / README.md
Last active December 17, 2023 22:07 — forked from anonymous/bookmarklet.js
rule-of-thirds bookmarklet

rule-of-thirds bookmarklet that overlays a rule-of-thirds style grid over all images on a page.

To get the bookmarklet, visit http://bl.ocks.org/4331769

Bookmarklet Development Notes

Do the following to be able to use the "RuleOfThirds-localhost" development version of the bookmarklet:

@dergachev
dergachev / README.md
Created December 18, 2012 21:19
Drupal views cache links

Links about Generational Cache

Views content cache module:

@dergachev
dergachev / test-svg-no-extension.txt
Created December 20, 2012 18:56
SVG gist 404 error test
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1" viewBox="0 0 300 300" preserveAspectRatio="none">
<defs>
<g id="horizontal-lines">
<polyline vector-effect="non-scaling-stroke" points="0,100 300,100" />
<polyline vector-effect="non-scaling-stroke" points="0,200 300,200" />
</g>