Skip to content

Instantly share code, notes, and snippets.

View corygibbons's full-sized avatar

Cory Gibbons corygibbons

View GitHub Profile
@dupuy
dupuy / README.rst
Last active April 23, 2024 23:38
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@1wErt3r
1wErt3r / SMBDIS.ASM
Created November 9, 2012 22:27
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@zspecza
zspecza / stylus-best-practices.md
Last active May 27, 2021 05:25
Stylus Best Practices

Stylus Best Practices

Introduction

This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.

// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@squarism
squarism / iterm2.md
Last active May 4, 2024 13:06
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@dsdsdsdsdsds
dsdsdsdsdsds / cursor.css
Last active November 1, 2023 11:45
CSS: Cross Browser hires/retina cursor image
.cursor {
cursor: url("cursor.png") 0 0, pointer; /* Legacy */
cursor: url("cursor.svg") 0 0, pointer; /* FF */
cursor: -webkit-image-set(url("cursor.png") 1x, url("cursor@2x.png") 2x) 0 0, pointer; /* Webkit */
}
@iammerrick
iammerrick / children-as-function.js
Created May 24, 2016 23:41
Which API do you prefer? Passing a function into the Ratio component or making a higher order component called Ratio you can use to configure a component.
<Ratio width={Ratio.OPTIONS.FLUID} x={3} y={4}>
{(width, height) => (
<Chart id={this.props.id} width={width} height={height} />
)}
</Ratio>
@tomysmile
tomysmile / mac-setup-redis.md
Last active March 18, 2024 22:12
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis

Theo lets you preprocess your JSON data before sending it through to its normal processes. This preprocess allows you to use a nested props structure, which is then converted to standard flat props.

props:
  BUTTON:
    BACKGROUND:
      value: blue
    COLOR:
      value: white 
 HOVER:
@lostfictions
lostfictions / svg-to-css-clip-path-polygon.js
Created January 2, 2018 02:01
convert an svg to a css clip-path polygon
// why do this? clip-path accepts a `url` reference to an svg element, right?
// the difference is that anything defined as a `basic-shape` can be animated:
// https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
const input = `121.151,20.761 170.165,55.885 200.872,3.816 231.145,55.884 280.592,20.762 286.854,80.687 346.526,68.666
327.657,126.005 387.276,139.247 346.502,184 395.796,220.302 340.127,244.647 370.611,297.814 309.636,297.457 316.076,358.381
260.303,333.3 241.622,391.529 200.655,345.979 160.121,391.53 141.008,333.302 85.666,358.381 91.673,297.456 31.131,297.813
61.183,244.647 5.947,220.302 54.81,184 14.466,139.248 73.652,126.004 55.216,68.667 114.457,80.688 `
const viewBoxScale = 4