If you need to quickly host a static HTTP site from your Mac for testing or other purposes, run the following commands.
$ cd /path/to/local/static/site
$ python -m SimpleHTTPServer 8000
{sql, _} = Repo.to_sql(:all, query) | |
IO.puts sql |
If you need to quickly host a static HTTP site from your Mac for testing or other purposes, run the following commands.
$ cd /path/to/local/static/site
$ python -m SimpleHTTPServer 8000
I hereby claim:
To claim this, I am signing this object:
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
echo "[${BRANCH}] " | |
fi | |
} | |
PS1="⚡️ \w \[\e[32m\]\`parse_git_branch\`\[\e[m\]\[\e[33m\]\u\[\e[m\]$ " |
var DropDownListOption = React.createClass({ | |
render: function() { | |
return ( | |
<option value={this.props.value}>{this.props.text}</option> | |
); | |
} | |
}); | |
var DropDownList = React.createClass({ | |
getDefaultProps: function() { |
I hereby claim:
To claim this, I am signing this object:
using System.Data.Entity; | |
using System.Linq; | |
namespace SurveyTool.Models.Repositories | |
{ | |
public class BaseRepository<T> where T : class | |
{ | |
public SurveyToolEntities Context { get; set; } | |
public BaseRepository() |
using System; | |
using System.Drawing; | |
namespace SurveyTool.Helpers | |
{ | |
public static class ImageHelper | |
{ | |
public static Image ScaleImage(Image image, int maxWidth, int maxHeight) | |
{ | |
// credit: http://stackoverflow.com/a/6501997/8357 |