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
import { Express } from 'express'; | |
import path from 'path'; | |
import webpack from 'webpack'; | |
import webpackDevMiddleware from 'webpack-dev-middleware'; | |
const webpackConfig = require('../../../frontend/webpack/webpack.dev.config'); | |
export function addDevMiddlewares(app: Express) { | |
const compiler = webpack(webpackConfig); | |
const middleware = webpackDevMiddleware(compiler, { |
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
-- requires that "cmd+shift+m" is the keyboard shortcut for mute | |
on run | |
tell application "Discord" to activate | |
tell application "System Events" | |
-- toggle mute | |
keystroke "m" using {command down, shift down} | |
-- cmd+tab back to previous application | |
keystroke tab using {command down} | |
end tell | |
end run |
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
tell application "Discord" to activate | |
tell application "System Events" | |
-- requires that you create a keyboard shortcut for cmd+shift+m | |
keystroke "m" using {command down, shift down} | |
keystroke tab using {command down} | |
end tell |
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
activate application "iTerm" | |
tell application "System Events" to tell application process "iTerm2" | |
-- open the preferences or bring to front (window 1) | |
keystroke "," using {command down} | |
delay 0.1 | |
-- Change to the General tab | |
click button "Pointer" of toolbar 1 of window 1 | |
delay 0.1 |
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 React = require('react/addons') | |
, cx = require('classnames') | |
, Formsy = require('formsy-react') | |
; | |
Formsy.AddonMixin = { | |
propTypes: { | |
groupClassName: React.PropTypes.oneOfType([ | |
React.PropTypes.array, |
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 React = require('react/addons') | |
, cx = require('classnames') | |
, Formsy = require('formsy-react') | |
; | |
Formsy.Input = React.createClass({ | |
mixins: [Formsy.Mixin], | |
propTypes: { | |
groupClassName: React.PropTypes.oneOfType([ |
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
public static void Log (Exception ex, ReportSeverity severity= ReportSeverity.Error, | |
[CallerMemberName] string memberName = "", | |
[CallerFilePath] string sourceFilePath = "", | |
[CallerLineNumber] int sourceLineNumber = 0) | |
{ | |
try{ | |
Console.WriteLine (ex); | |
Console.WriteLine("{0} - {1} - {2} \r\n {3}",sourceFilePath,memberName,sourceLineNumber,ex); |
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 yourApp = {}; | |
yourApp.objectToQueryString = function(obj, base) { | |
var tmp; | |
// If a custom toString exists bail here and use that instead | |
if(Object.isArray(obj) || (Object.isObject(obj) && obj.toString === Object.prototype.toString)) { | |
tmp = []; | |
yourApp.iterateOverObject(obj, function(key, value) { | |
if(base) { | |
key = base + '[' + key + ']'; |
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
#! /usr/local/bin/node | |
// BASED OFF THIS SCRIPT: https://gist.github.com/aliou/7310354 | |
var _ = require('underscore'); | |
var DayOne = require('dayone').DayOne; | |
var DayOneEntry = require('dayone').DayOneEntry; | |
var moment = require('moment'); | |
var path = require('path-extra'); | |
var notifier = require('node-notifier'); |
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
# -*- coding: utf-8 -*- | |
import alfred | |
import calendar | |
import time | |
import math | |
from delorean import utcnow, parse, epoch, Delorean | |
# global var to see if user | |
# has a time offset |