Skip to content

Instantly share code, notes, and snippets.

View city41's full-sized avatar
🙃

Matt Greer city41

🙃
View GitHub Profile
@city41
city41 / gist:958009
Created May 5, 2011 21:32
Get content type from file extension
public string GetContentType(string filename)
{
string mimeType = "application/unknown";
string extension = Path.GetExtension(filename);
if (string.IsNullOrWhiteSpace(extension))
{
return mimeType;
}
@city41
city41 / gist:e3a822fc4c2d3104443b
Last active August 29, 2015 14:14
cljs :main

project.clj snippet:

:cljsbuild {:builds {:app {:source-paths ["src/cljs"]
                             :compiler {:output-to     "resources/public/js/app.js"
                                        :output-dir    "resources/public/js/out"
                                        :externs       ["react/externs/react.js"]
                                        :main my-app/core
                                        :optimizations :none
 :pretty-print true}}}}
@city41
city41 / gist:680c728cdf69ff780c88
Last active August 29, 2015 14:00
Show indentation in Atom
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed.
*
* If you are unfamiliar with LESS, you can read more about it here:
* http://www.lesscss.org
*/
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`