Skip to content

Instantly share code, notes, and snippets.

View cfurrow's full-sized avatar
🐢
Can you fix my bugs faster than I can write them? I doubt it.

Carl Furrow cfurrow

🐢
Can you fix my bugs faster than I can write them? I doubt it.
View GitHub Profile
@cfurrow
cfurrow / .env
Last active February 19, 2023 16:23
Create a "Saturday Morning Cartoons" Plex playlist
PLEX_URL="http://192.168.1.5:32400"
PLEX_TOKEN=abc123
@cfurrow
cfurrow / .env
Last active May 14, 2021 02:38 — forked from blacktwin/aired_today_playlist.py
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first, using PlexAPI
PLEX_URL="http://192.168.1.72:32400"
PLEX_TOKEN=abcdefg
@cfurrow
cfurrow / rails_resources.md
Created February 1, 2016 17:55 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@cfurrow
cfurrow / javascript_resources.md
Created February 1, 2016 17:55 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
class BullshitController < ApplicationController
respond_to :json
def bullshit
bullshit = Bullshit.new
if bullshit.save
respond_with bullshit, status: :ok
else
respond_with bullshit, status: :unprocessable_entity
end
$ HOMEBREW_MAKE_JOBS=1 VERBOSE=1 brew install mercurial 2>&1
/usr/bin/env python -c import docutils
/usr/bin/env python -c import docutils
/usr/bin/env python -c import docutils
==> Writing /usr/local/lib/python2.7/site-packages/sitecustomize.py
==> Downloading http://mercurial.selenic.com/release/mercurial-2.6.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/mercurial-2.6.1.tar.gz
tar xf /Library/Caches/Homebrew/mercurial-2.6.1.tar.gz
brew: Setting PYTHONPATH=/usr/local/Cellar/mercurial/2.6.1/lib/python2.7/site-packages
==> make doc
public class ApplicationController : Controller
{
//...
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
log4net.GlobalContext.Properties["requestid"] = Guid.NewGuid();
log4net.GlobalContext.Properties["email"] = CurrentUser.Email;
log4net.GlobalContext.Properties["customername"] = CurrentCustomer.Name;
log4net.GlobalContext.Properties["url"] = requestContext.HttpContext.Request.Url.ToString();
}
@cfurrow
cfurrow / moment.js
Created February 21, 2012 20:09
Moment.js examples
var now = moment();
console.log(now.format('dddd, MMMM Do YYYY, h:mm:ss a')); // => Tuesday, February 21st 2012, 3:03:51 pm
var halloween = moment([2011, 9, 31]); // September 31st
console.log(halloween.fromNow()); // 4 months ago
var now = moment().add('days', 9);
console.log(now.format('dddd, MMMM Do YYYY')); // Thursday, March 1st 2012
window.q = [];
window.$ = function(f){
q.push(f);
};
//... jQuery now loaded. run all jQuery "ready" functions queued up
$.each(window.q,function(key,val){
$(val);
});
@cfurrow
cfurrow / webrequestproxy.cs
Created January 4, 2012 02:58
Set WebRequest.Proxy to Null
private WebResponse BuildAndGetResponse()
{
string url = BuildUrl();
WebRequest request = null;
WebResponse response = null;
request = WebRequest.Create(url);
request.Proxy = null; // muy importanté
response = request.GetResponse();
return response;