This file contains 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
import mongoose from 'mongoose'; | |
import MongodbMemoryServer from 'mongodb-memory-server'; | |
let mongoServer; | |
beforeAll(async () => { | |
mongoServer = new MongodbMemoryServer(); | |
const mongoUri = await mongoServer.getConnectionString(); | |
await mongoose.connect( | |
mongoUri, | |
{useNewUrlParser: true}, |
This file contains 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
/* | |
* MuiThemeWrapper.js | |
* | |
* Simplifies Material-UI React components when you don't have a single top-level component, | |
* which is common in Rails and Meteor where you're including components in pages as needed. | |
* | |
*/ | |
import React, { Component } from 'react'; | |
import {deepOrange500} from 'material-ui/styles/colors'; |
This file contains 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
# Be sure to remove bootstrap-editable-rails from application.js | |
unless EditableForm | |
EditableForm = undefined | |
EditableForm = $.fn.editableform.Constructor | |
EditableForm::saveWithUrlHook = (value) -> | |
originalUrl = undefined | |
resource = undefined | |
originalUrl = @options.url | |
resource = @options.resource | |
@options.url = ((_this) -> |
This file contains 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
# Easy access to xlsm files through the roo gem, version 1.10.0. | |
# The error that led me to write this is in the file below for google fodder. Not exactly sure what was causing | |
# the problem, so I'm not sure that this change won't break everything on your computer or summon zombies. | |
# | |
# Be sure to tell roo that you don't care about the extension mismatch: | |
# xl = Excelx.new("C:/path/to/spreadsheet_with_macro.xlsm", :zip, :warning) | |
# | |
class Excelx | |
alias :old_initialize :initialize |
This file contains 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
(* | |
Folder action to queue downloaded torrents in your uTorrent web gui. With a dyndns account you can initiate downloads on your file server from wherever you happen to be. | |
Gotta have uTorrent with web gui (Windows, Mac, or Linux with Wine). | |
Gotta have growl, too. | |
- Paste into Script Editor | |
- Edit the user, password, and server url below. | |
- Add as a folder action on your download directory |
This file contains 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
# Assumes that your Music library is shared out | |
# and XBMC accesses it via Windows filesharing. | |
# | |
# Install the xbmc gem: gem install xbmc (may also need to run 'gem sources -a http://gemcutter.org') | |
# Edit the variables below and save as intune.rb | |
# Run 'ruby intune.rb'. | |
require 'win32ole' | |
require 'xbmc' |
This file contains 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
Dir.glob(File.join(File.dirname(__FILE__), 'recipes/*.rb')).each {|f| require f } |
This file contains 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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" | |