This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURRENT_VERSION=$(npm show $(node -pe 'require("./package.json").name') version) | |
NEXT_VERSION=$(node -pe 'require("./package.json").version') | |
[ "$CURRENT_VERSION" != "$NEXT_VERSION" ] && npm publish |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(() => { | |
const check = () => { | |
const status = document.querySelector('[data-combined-status]').dataset.combinedStatus | |
switch(status) { | |
case 'success': | |
const btn = document.querySelector('[data-details-container=".js-merge-pr"]') | |
if (!btn) { | |
alert('PR already merged.') | |
break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dist | |
node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs') | |
const mongoose = require('mongoose') | |
const Batch = require('batch') | |
const models = require('lib/models') | |
const data = require('./topics.json') | |
const ObjectId = mongoose.Schema.ObjectId | |
models() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
var json2csv = require('json2csv') | |
var models = require('lib/models') | |
models() | |
var Topic = models.Topic | |
Topic | |
.find({deletedAt: null}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var OWNER_EMAIL = process.env.OWNER_EMAIL || '[email protected]' | |
//-------------------------- | |
require('lib/models')() | |
var config = require('lib/config') | |
var models = require('lib/models') | |
var User = models.User |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
info () { | |
echo "$(tput setaf 6) · $@$(tput sgr0)" | |
} | |
warn () { | |
echo "$(tput setaf 3) · $@$(tput sgr0)" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config --global alias.cf '!sh -c "git diff --name-only | uniq | xargs subl"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* onResize.js | |
* | |
* `window.onresize` handler with a debounced calling to avoid unnecessary re-paints. | |
* | |
* e.g.: | |
* onResize.add(function(){ | |
* console.log('Executed on window resize! But debounced.') | |
* }) | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log() { | |
echo "$(tput setaf 6) · $@$(tput sgr0)" | |
} | |
read -e -p 'Heroku App Name? (e.g. `legoland-democracyos`) ' APP_NAME | |
read -e -p 'Mongo Host:port/db? (e.g. `ds043991.mongolab.com:43991/heroku_app34008377`) ' MONGO_HOST | |
read -e -p 'Mongo User? ' MONGO_USER | |
read -e -p 'Mongo Pass? ' MONGO_PASS | |
log "Setting maintenance:on" |
NewerOlder