Skip to content

Instantly share code, notes, and snippets.

@boucher
boucher / gist:1750368
Created February 6, 2012 07:07 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@NigelThorne
NigelThorne / styler.css
Created March 1, 2012 22:42
WorkFlowy userscript to add css classes to nodes based on their tags
/* I use Stylish (a chome addin) to set these styles
* URLs on the domain workflowy
*/
.next-row {
border: 2px solid #46A546 !important;
border-top-left-radius:0.5em;
background-color: #CCFFCC !important;
}
@ScottDugas
ScottDugas / trello.css
Created May 24, 2012 18:47
Stylish that colors the entire Trello card based on labels
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("trello.com") {
/* Highlight cards
* These must go in the same order
* as the hiding labels
* Note, there ordering is important, the colors at the bottom will take precedence over those at the top
*/
div.list-card.purple-label {
@RobTrew
RobTrew / select_ft_theme.applescript
Created November 18, 2012 15:39
Select FoldingText theme, and restart FoldingText
-- Permission is hereby granted, free of charge,
-- to any person obtaining a copy of this software
-- and associated documentation files (the "Software"),
-- to deal in the Software without restriction,
-- including without limitation the rights to use, copy,
-- modify, merge, publish, distribute, sublicense,
-- and/or sell copies of the Software, and to permit persons
-- to whom the Software is furnished to do so,
-- subject to the following conditions:
@tvandervossen
tvandervossen / environment.js
Last active April 2, 2024 20:18
Here’s an example of my current web app user agent, device, and/or feature detection approach. I tend to inline this in the page header just before the stylesheet as part of the distribution build. A benefit of this approach is that detection is done early without any external dependencies. It’s also straightforward to modify or extend while you…
env = (function() {
var flags = {}, ua = navigator.userAgent, el = document.createElement('div'), video = document.createElement('video'), audio = document.createElement('audio'), root = document.documentElement, i
function flag(names) {
names = names.split(' ')
for (i = 0; i < names.length; i++)
flags[names[i]] = true
}
function classnames() {
var names = [], name
for(name in flags) if (flags.hasOwnProperty(name))
@data-enhanced
data-enhanced / trello-user-css-safari.css
Last active September 12, 2019 10:54
Custom Trello Styles - in Mac Safari - using User CSS Extension
/*
* Subtler, clearer colors and edges
* Emphsasize first two lists
* -- can be modified in CSS to include fewer or more lists
*/
* {
border-radius: 0 !important;
}
@aloncarmel
aloncarmel / randombg.js
Created August 20, 2013 13:35
Grab a random background from unsplash.com and apply to a div.
function GetRandomBackground()
{
var url = 'http://unsplash.com/rss';
$.ajax({
url: document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(url),
async: false,
jsonpCallback: 'jsonCallback',
contentType: "application/json",
@EvanLovely
EvanLovely / Get_front_Mac_App_URL--markdown.applescript
Created May 27, 2014 22:05
Get Front Mac App Title and URL and make a Markdown Link to it
# Grab a URL from Chrome, Safari, Mail, Contacts, Finder, TextEdit, Omnifocus, Chrome Canary, or FoldingText
# Borrowed from: http://www.alfredforum.com/topic/917-reminders/?hl=reminders
tell application (path to frontmost application as text)
set theApplication to get name
end tell
set theText to ""
set theBody to ""
if theApplication is "Google Chrome" then
tell application id "com.google.chrome"
@tzarskyz
tzarskyz / gist:07ccdb64b7f860bd1f4c
Created June 6, 2014 11:41
Export Safari's Tab to frontmost FoldingText 2.x window - Alfred ready.
-- All code grabbed and requested help with from generous parties and unsuspecting github users.
--
-- Create Markdown link from front most tab in safari and append
-- to end of current FoldingText document as new list item.
-- UNCOMMENT FOR USE IN ALFRED
on alfred_script(q)
--on run
-- -- -- -- -- -- -- -- --
--
@docsteveharris
docsteveharris / main.js
Created June 7, 2014 21:16
FoldingText keybindings to focus in or out by a level
// Log
// ===
// 140607 - cloned from demo keybindings.ftplugin
define(function(require, exports, module) {
'use strict';
var Extensions = require('ft/core/extensions').Extensions;
Extensions.addInit(function (editor) {