Skip to content

Instantly share code, notes, and snippets.

View coryt's full-sized avatar
💡
Learning

Cory Taylor coryt

💡
Learning
View GitHub Profile

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@coryt
coryt / ThrottlePlugin.cs
Created January 26, 2015 00:24
ServiceStack plugin to throttle api requests
public class ThrottlePlugin : IPlugin
{
/// <param name="redisHost">host name</param>
/// <param name="redisPort">port</param>
/// <param name="redisPassword">password</param>
public ThrottlePlugin(string redisHost, int redisPort, string redisPassword = null)
{
_redisClient = new RedisClient(redisHost, redisPort, redisPassword);
}
public class ThrottleInfoAttribute : Attribute
{
public int PerMinute { get; set; }
public int PerHour { get; set; }
public int PerDay { get; set; }
}
@coryt
coryt / install-teamcity.md
Last active September 17, 2015 07:41 — forked from sandcastle/install-teamcity.md
Install TeamCity 9.1.1 on Ubuntu with Nginx
@coryt
coryt / url.js
Last active September 10, 2015 14:15
Issues Template
javascript:(function() {var e = document.getElementById('issue_body');if (e) {e.value += '#### What\'s the problem?\n\n#### Steps to reproduce?\n* Account used: \n* Feature (home feed, case detail, login, etc):\n\n#### Screenshots (if appropriate)\n\n';}})();
@coryt
coryt / url.js
Created September 10, 2015 14:13
PullRequest Template
javascript:(function() {var e = document.getElementById('pull_request_body');if (e) {e.value += '#### What\'s this PR do?\n\n#### Checklist\n- [ ] Code reviewed @erewh0n @Dkane1 @richardpenner @coryt\n- [ ] Unit/Integration Tests Written/Passing\n\n#### Mongo Index Changes?\n\n#### How should this be manually tested?\n\n#### Related Issues/Stories?\n\n#### Screenshots (if appropriate)\n\n#### Questions:\n- Do migrations need to be ran?\n- Are there any additional deployment instructions/requirements?';}})();
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@coryt
coryt / com.yourcompany.autossh.plist
Created October 20, 2016 14:41 — forked from venj/com.yourcompany.autossh.plist
Put following gist to ~/Library/LaunchAgents, and then run: launchctl load /Users/your_name/Library/LaunchAgents/com.yourcompany.autossh.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>OnDemand</key>
<false/>
<key>KeepAlive</key>
<true/>
@coryt
coryt / gist:406193fe9853f434922f082bb29edca0
Created March 8, 2018 21:09 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht

Keybase proof

I hereby claim:

  • I am coryt on github.
  • I am coryt (https://keybase.io/coryt) on keybase.
  • I have a public key ASC1JVhvDlIF56ItfE1SmHruCl6jd6RT_CROymD4GvwdTAo

To claim this, I am signing this object: