Skip to content

Instantly share code, notes, and snippets.

View 0mj's full-sized avatar
🙏

Matt Jamison 0mj

🙏
  • Ohio
  • 22:01 (UTC -04:00)
View GitHub Profile
@josuecau
josuecau / wait.js
Created December 2, 2019 17:08
JavaScript setTimeout as a Promise
module.exports = delay => new Promise(resolve => setTimeout(resolve, delay))
@VladRez
VladRez / github-no-configured-push-destination.sh
Created April 20, 2019 22:31
No configured push destination
# fatal: No configured push destination
# # Remote #local:#remote branch
git push --set-upstream https://github.com/username/repo.git master:master
# use `--force` flag on conflict
document.body.contentEditable = true;
@iftee
iftee / wp-config-partial.php
Created June 1, 2016 12:52
Conditional DB Secting in wp-config.php for maintaining WordPress from Development Server and Pushing to Production Server
<?php
/*
* Unified variables
*/
$charset = 'UTF-8';
$collate = '';
/*
* Set variables conditianlly based on current environment
@calebgrove
calebgrove / stateToAbbr.js
Last active April 24, 2024 22:18
Convert state name to abbreviation in JavaScript. There's some better solutions in the comments, so scroll down!
// There's some better solutions in the comments, so scroll down and see how other folks have improved this!
// USAGE:
// abbrState('ny', 'name');
// --> 'New York'
// abbrState('New York', 'abbr');
// --> 'NY'
function abbrState(input, to){