Skip to content

Instantly share code, notes, and snippets.

@ghosh
ghosh / micromodal.css
Last active November 1, 2024 17:55
Demo modal styles for micromodal.js and corresponding expected html. If using this, set the `awaitCloseAnimation` in config to true
/**************************\
Basic Modal Styles
\**************************/
.modal {
font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif;
}
.modal__overlay {
position: fixed;
@gomar
gomar / 00-intro.md
Last active January 30, 2024 04:58
Setting up a Keynote document for grid layout design

Setting up a Keynote document for grid layout design

I like (love ?) Keynote because it

  • is a simple to use presentation software,
  • is vector based (when zooming it just looks gorgeous)
  • exports to powerpoint

If I could remove that last argument, I would, but the fact is that, as a consultant, the final document is almost always expected to be a powerpoint document. Don't ask me why, it is just so. I am fighting against it but I did not win the battle so far ...

@CodeMyUI
CodeMyUI / css-perspective-text-hover.markdown
Created August 23, 2016 23:44
CSS Perspective Text Hover
@bendc
bendc / display-fade.html
Created June 22, 2016 03:01
Transitioning the opacity of a hidden element
<!doctype html>
<meta charset="utf-8">
<title>Example</title>
<style>
div {
width: 100px;
height: 100px;
background: black;
animation-duration: .5s;
@luruke
luruke / smashingmagazine.js
Last active January 12, 2022 15:34
Source code of the demo "Improving User Flow Through Page Transitions" on Smashing Magazine.
/*
https://www.smashingmagazine.com/2016/07/improving-user-flow-through-page-transitions/
You can copy paste this code in your console on smashingmagazine.com
in order to have cross-fade transition when change page.
*/
var cache = {};
function loadPage(url) {
if (cache[url]) {
@moderatorwes
moderatorwes / zendesk.js
Created March 2, 2016 20:29
Zendesk: Hide default system fields on Zendesk Ticket Form
//hide system fields based on ticket forms(change subdomain and form id)
if (window.location.href == "https://yoursubdomain.zendesk.com/hc/en-us/requests/new?ticket_form_id=11111") {
$('.request_subject').hide();
$('.request_description').hide();
$('.form-field label:contains("Attachments")').hide();
$('#upload-dropzone').hide();
}
@BryanBarrera
BryanBarrera / url.js
Created October 8, 2015 14:12
Show/Hide element based on URL Parameter
// Show #element1 by default
// Show #element1 & #element2 by a unique url string
// --
// ! #element2 is hiding by default with a class of `.hide`
// --
// if the url string is `?sample=one`
// show `#element1` widget and hide the `#peakday` widget
if (location.search == "?sample=one") {
$('#element1').show();
@ToeJamson
ToeJamson / 1.html
Last active October 12, 2022 12:41
Realtime Location Tracking on a Map using JavaScript
<script type="text/javascript" src="http://pubnub.github.io/eon/lib/eon-map.js"></script>
<link type="text/css" rel="stylesheet" href="http://pubnub.github.io/eon/lib/eon.css" />
<div id='map'></div>
<script type="text/javascript">
eon.map({
id: 'map',
mb_token: 'mapbox api token',
mb_id: 'mapbox map id',
subscribe_key: 'subscribe_key_here',
channel: 'my map channel'
@bleikamp
bleikamp / dots2.md
Last active September 15, 2016 08:12

dots

/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();