Skip to content

Instantly share code, notes, and snippets.

View joe-bell's full-sized avatar

Joe Bell joe-bell

View GitHub Profile
@takien
takien / youtubeID.js
Last active August 15, 2025 06:28
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);
@daneden
daneden / Instructions.md
Created December 1, 2015 00:25
Remap Caps Lock to Emoji on Mac

How to remap the caps lock key to the emoji selector on Mac

  1. Go to System Preferences -> Keyboard -> Modifier Keys...
  2. Change “Caps Lock” to “No action”
  3. Install Seil
  4. Change the Caps Lock key in Seil to keyCode 80 (F19)
  5. Install Karabiner
  6. Open Karabiner and go to Misc & Uninstall -> Open private.xml
  7. Copy the contents of this gist's example to the XML file and save
  8. In Karabiner, go to Change Keys -> Reload XML
@chiplay
chiplay / system.tsx
Last active October 25, 2021 06:39
Styled-system + Typescript
import React, { HTMLAttributes } from 'react'; // version 16.4.2
import styled from 'styled-components'; // version 4.0.3
import * as SS from 'styled-system'; // version 3.2.0
import * as CSS from 'csstype';
export interface BaseProps extends HTMLAttributes<HTMLDivElement> {}
export interface BoxProps extends BaseProps,
SS.BgColorProps,
SS.SpaceProps,
@mirisuzanne
mirisuzanne / cq.css
Last active October 6, 2021 10:41
Thoughts on Container Queries
/*
This is not meant to be a final CSSWG proposal,
but reflects my immediate thoughts after reading
[David Baron's](https://github.com/dbaron/container-queries-implementability) promising draft.
This gist was created to demonstrate my idea for removing selectors from his query syntax.
More of my thoughts & notes are online at css.oddbird.net/rwd/
*/
main,
@danhollick
danhollick / tailwind-css-v4.mdc
Last active August 14, 2025 13:34
Cursor rules file for Tailwind CSS v4.0
// Update globs depending on your framework
---
name: tailwind_v4
description: Guide for using Tailwind CSS v4 instead of v3.x
globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"]
tags:
- tailwind
- css
---