Skip to content

Instantly share code, notes, and snippets.

View round's full-sized avatar
🎯
Focusing

Maxim Leyzerovich round

🎯
Focusing
View GitHub Profile
@jadeatucker
jadeatucker / HOWTODMG.md
Last active May 29, 2024 21:16
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@tkhn
tkhn / apache-exclude-urls-basic-auth.conf
Created October 9, 2013 10:33
exclude one url from basic auth with apache
SetEnvIfNoCase Request_URI "^/status\.php" noauth
AuthType Basic
AuthName "Identify yourself"
AuthUserFile /path/to/.htpasswd
Require valid-user
Order Deny,Allow
Deny from all
Allow from env=noauth
@salcode
salcode / gist:6912619
Last active November 8, 2023 01:11
jQuery function to remove all "data-" attributes from a given element
// Note: This is an improved version provided by @laurentmuller in the comments below.
// removes all data attributes from a target element
// example: removeDataAttributes('#user-list');
function removeDataAttributes(target) {
var $target = $(target);
// Loop through data attributes.
$.each($target.data(), function (key) {
// Because each key is in camelCase,
@davatron5000
davatron5000 / icon-grid.html
Created January 14, 2015 21:27
SVG Icon Grid
<div id="styleguide-icon-grid"></div>
<object data="/assets/icons.svg" id="svgembed" height=0; width=0></object>
<script>
var grid = document.querySelector('#styleguide-icon-grid');
var tmpl = '<div class="item"><svg class="icon"><use xlink:href="/assets/icons.svg#{id}"></use></svg><span>#{id}</span></div>';
function svgloaded() {
var svgEmbed = document.querySelector("#svgembed");
var svg = svgEmbed.getSVGDocument();
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@mayneyao
mayneyao / notion2blog.js
Last active June 15, 2024 02:51
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",