Skip to content

Instantly share code, notes, and snippets.

@PurpleBooth
PurpleBooth / README-Template.md
Last active April 26, 2024 01:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@wh1tney
wh1tney / deploy-static-site-heroku.md
Last active April 23, 2024 17:49
How to deploy a static website to Heroku

Gist

This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

@matthewarkin
matthewarkin / gist:bb310ee27323ffee7ab8
Last active August 6, 2017 17:24
stripe upgrade, prorate, and bill for proration instantly
//create subscription
// $20 a month
curl https://api.stripe.com/v1/customers/cus_18nj91X8lMXyju/subscriptions
-u private key:
-d plan=gold
//change subscription - upgrade plan
//$40 a month
curl https://api.stripe.com/v1/customers/cus_18nj91X8lMXyju/subscriptions/sub_4HWcxqoS8wG7T3 \
-u private key: \
@rxaviers
rxaviers / gist:7360908
Last active April 26, 2024 02:35
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kovaldn
kovaldn / HTML: select, year & month.js
Last active May 23, 2018 20:17
HTML: select, year & month
// html
<label for="year">Год</label>
<select name="year" id="year"></select>
<label for="month">Месяц</label>
<select name="month" id="month">
<option value = "1">01</option>
<option value = "2">02</option>
<option value = "3">03</option>
<option value = "4">04</option>

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@hitautodestruct
hitautodestruct / readme.md
Last active September 26, 2022 11:25 — forked from anonymous/gist:4344870
Generate a custom structure for Wordpress menus.

This gist is for showing an example of a custom wordpress menu.

If you want to get more from the menu item simply have a look at the $item object. i.e:

// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );

This code works on Wordpress 4.1.1 as of 31st of March 2015

@markoheijnen
markoheijnen / gist:4236025
Last active October 13, 2015 18:17
WordPress Engine shortcode
<?php
class Marko_Shortcodes {
public function __construct() {
add_shortcode( 'engine_info', array( $this, 'engine_info' ) );
}
public function engine_info( $atts ) {
global $wp_version, $wpdb, $batcache, $wp_object_cache;
@sapegin
sapegin / footer.php
Created August 7, 2012 19:10
RequireJS in Wordpress theme