Skip to content

Instantly share code, notes, and snippets.

View webdesignberlin's full-sized avatar
:octocat:
...

Michael Raguse webdesignberlin

:octocat:
...
View GitHub Profile
@rpontes
rpontes / jquery.nodoubletapzoom.js
Created November 23, 2012 19:27 — forked from johan/jquery.nodoubletapzoom.js
A jQuery plugin to selectively disable the iOS double-tap-to-zoom action on specific page elements (and have that generate two click events instead).
// jQuery no-double-tap-zoom plugin
// Triple-licensed: Public Domain, MIT and WTFPL license - share and enjoy!
(function($) {
var IS_IOS = /iphone|ipad/i.test(navigator.userAgent);
$.fn.nodoubletapzoom = function() {
if (IS_IOS)
$(this).bind('touchstart', function preventZoom(e) {
var t2 = e.timeStamp
@dnaber-de
dnaber-de / dna-tpl-to-admin-bar.php
Last active April 13, 2018 15:05
WordPress plugin to show the current used template file name in the admin bar.
<?php
/**
* Plugin Name: dna Template Name to Admin Bar
* Plugin URI: https://gist.github.com/4690246
* Description: Shows the current used theme template file in the admin bar. (Requires PHP 5.3)
* Author: David Naber
* Author URI: http://dnaber.de/
* Version: 2013.11.09
* License: MIT
@marcobarbosa
marcobarbosa / front-end-setup.md
Last active November 29, 2016 06:16
Reference for the steps necessary to code a good front-end project on a Mac.

Front-end coding environment set-up

This guide covers pretty much all that you need to have installed in your Mac for a top notch front-end coding environment.

This guide also assumes that you are going to use yeoman or grunt for your project.

XCode

It is recommended that you have Xcode installed and it's Command Line Tools to give you any command line binary that you might need (such as wget). You can also download it within Xcode itself

@gregrickaby
gregrickaby / html5-schema.org-markup.html
Last active August 2, 2022 00:05
Proper SCHEMA.ORG markup
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active November 29, 2023 15:35
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@PaulKinlan
PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js
Last active April 2, 2024 02:45
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@dmcclintock
dmcclintock / Symantic-No-Skew-Single-Slant-CSS3-"Razorblade-Rectangles".markdown
Last active March 4, 2020 06:22
Single Slant CSS3 Divs - ("Responsive Razorblade Rectangles")

Single Slant CSS3 Divs - ("Responsive Razorblade Rectangles")

=============================================================== Fully responsive and cross-browser compatible rectangles with slanted edges using pseudo-elements (as supposed to the "skew" transform). In contrast with the skew alternative, the method employed does not cause the rectangles' skewed sides to affect containing elements (such as text), and has minimal impact on surrounding elements in terms of positioning. The code affords full use of other CSS3 styling techniques for additional customization, such as CSS styling, hover states, transitions, etc.

Free for all developers to use and pass along - share the <3

See it in action at TacoBarCompany.com.

To-Do:

@mnpenner
mnpenner / screenshot.js
Last active December 5, 2019 16:08
Save a screenshot with selenium-webdriver for JavaScript
var webdriver = require('selenium-webdriver');
var fs = require('fs');
var driver = new webdriver.Builder().build();
webdriver.WebDriver.prototype.saveScreenshot = function(filename) {
return driver.takeScreenshot().then(function(data) {
fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) {
if(err) throw err;
});
@Stanback
Stanback / nginx.conf
Last active May 10, 2024 12:07 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@aronwoost
aronwoost / README.md
Last active July 16, 2018 08:15
How to install node.js and CouchDB on a Google Compute Engine instance

#How to install node.js and CouchDB on a Google Compute Engine instance

Start and ssh into instance

Make sure you have a Google Compute engine account, have a project created and the gcutil command line tool installed.

Since want to ssh without the gcutil tool, you need to a your ssh key to the instance in addition to the already existing google_compute_engine key (used for gcutil).