Skip to content

Instantly share code, notes, and snippets.

@bdelespierre
bdelespierre / hatchshow.js
Last active August 4, 2017 19:47 — forked from charliepark/hatchshow.js
A jquery typography plugin.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
$('.hsjs').hatchShow();
});
(function($){
jQuery.fn.hatchShow = function(){
return $(this).css({
display: 'inline-block',
@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@jaccorens
jaccorens / fm_previousweek.txt
Last active August 29, 2015 14:07
Filemaker search variables for previous week
$currentDate = Get ( CurrentDate )
$searchStart = GetAsDate ( 7 * Int ( ( $currentDate + 7 ) / 7 ) - 13 ) // previous monday from today
$searchEnd = GetAsDate ( 7 * Int ( ( $currentDate + 7 ) / 7 ) - 7 ) // previous sunday from today
$searchRange = $searchStart & "..." & $searchEnd
//FileMaker formula
@johnhatvani
johnhatvani / Dates.playground
Last active March 15, 2023 10:12
Swift Playground #1 adding components to Date using operator overloading.
import Foundation
extension Int{
var day: (Int, Calendar.Component) {
return (self, .day)
}
var month: (Int, Calendar.Component) {
return (self, .month)
}
@stiucsib86
stiucsib86 / gist:6759495
Last active June 20, 2021 02:27
PHP test file for CORS testing.
<?php
header("Content-Type: application/json");
// Allow Credentials
header('Access-Control-Allow-Credentials: true');
// Allow all origins
if (isset($_SERVER['HTTP_REFERER']) || isset($_SERVER['HTTP_ORIGIN'])) {
if (isset($_SERVER['HTTP_REFERER'])) {
@judismith
judismith / FM Applescript Ping
Created August 11, 2012 04:22
Test for internet connection within Filemaker
try
set thePing to do shell script "/sbin/ping -o -c 5 www.google.com"
on error
set thePing to "error"
end try
tell application "FileMaker Pro Advanced"
if thePing is not "error" then
set cell "g_internet" to "true"
else
@charliepark
charliepark / hatchshow.js
Created July 30, 2011 16:07
A jquery typography plugin.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(window).load(function(){
$().hatchShow();
});
jQuery.fn.hatchShow = function(){
$('.hsjs').css('display','inner-block').css('white-space','pre').each(function(){
var t = $(this);
t.wrap("<span class='hatchshow_temp' style='display:block'>");
var pw = t.parent().width();
@benschwarz
benschwarz / index.html
Last active November 6, 2023 21:10
Using ARIA roles with <header>, <footer> and <aside>
<!doctype html>
<html>
<body>
<header role="banner">
<a href="/" rel="home">My company</a>
<nav role="navigation">
<a href="/about">About</a>
<a href="/contact">Contact</a>
</nav>
</header>