Skip to content

Instantly share code, notes, and snippets.

View Twipped's full-sized avatar
🗯️
Cursing out Typescript

Jocelyn Badgley Twipped

🗯️
Cursing out Typescript
View GitHub Profile
@jlstrater
jlstrater / bananabread.txt
Last active February 15, 2018 07:29
Banana Bread Recipe
Banana Bread (adapted from the St. Peter's Catholic Church Cookbook from my childhood)
1/2 cup butter (about half a 250g bar) softened
1 1/4 cup sugar (about 250 g)
2 eggs
1 1/2 cup flour (about 180 g)
3/4 tsp baking powder
2 1/2 tsp milk
1/2 tsp vinegar
1 tsp vanilla
@ldez
ldez / gmail-github-filters.md
Last active April 3, 2024 11:53
Gmail and GitHub - Filters

Gmail and GitHub

How to filter emails from GitHub in Gmail and flag them with labels.

The labels in this document are just examples.

Pull Request

Filter Label
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active April 19, 2024 01:50
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@chrisamoore
chrisamoore / Preferences.sublime-settings
Last active December 22, 2015 16:39
Sublime Settings * req* phpcs, phpmd, php-cs-fixer
{
"auto_complete_commit_on_tab": false,
"auto_id_class": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Cache/Theme - Default/Cam.tmTheme",
"command": "whitespacecorrector",
"create_window_at_startup": false,
"detect_slow_plugins": false,
"draw_minimap_border": false,
@leommoore
leommoore / node_running_in_production.md
Last active November 21, 2021 00:50
Node - Running in Production

#Node - Running in Production This gist is based on the excellent post by @hacksparrow which is found at http://www.hacksparrow.com/running-express-js-in-production-mode.html. The main principle is that you want the application to detect that it is running on a production server and to use the production configuration. The way to do this is to set the NODE_ENV=production. To do this you need to do the following:

$ export NODE_ENV=production

But we have a little problem here. The NODE_ENV environment variable will be lost if the server restarts, so it is safer to put it in the .bash_profile file. That way the variable will set again every time the system reboots. You will find the file in your home directory. It's a hidden file, so you can't see it unless you do a ls -la. We will append the export command to the .bash_profile file.

<?php
/**
* Mimetype for your file - requires PHP 5.3, not enabled on default by Windows
*/
$php_mime = finfo_open(FILEINFO_MIME);
$this->mime_type = strtolower(finfo_file($php_mime, $this->your_file_path_and_name));
finfo_close($php_mime);
// Thanks for great discussion from Ben Ramsey, Anthony Ferrara, Dave Reid, Jarvis Badgley
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@madrobby
madrobby / LICENSE.txt
Created May 19, 2011 12:44 — forked from 140bytes/LICENSE.txt
Functional array sorting
Copyright (c) 2011 Thomas Fuchs, http://mir.aculo.us
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: