Skip to content

Instantly share code, notes, and snippets.

@trntsmn
trntsmn / gist:9042727
Created February 17, 2014 00:34
python format for javascript
// These prototypes make life a little easier.
String.prototype.trim = String.prototype.trim || function trim() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); };
if (!String.prototype.format) {
String.prototype.format = function () {
var args = arguments;
return this.replace(/{(\d+)}/g, function (match, number) {
return typeof args[number] != 'undefined'
? args[number]
: match
;
@trntsmn
trntsmn / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
Go here to get an image:
http://east.us.odroid.in/?directory=.%2Fubuntu_14.04lts%2F
unxz ./ubuntu-14.04.1lts-lubuntu-odroid-c1-20150204.img.xz
sudo apt-get install pv
sudo dd if=./ubuntu-14.04.1lts-minimal-odroid-c1-20150131.img bs=5M | pv -s 64G | sudo dd of=/dev/mmcblk0 bs=5M^C
add the static route
auto eth0
[ForceHttps]
[HttpPatch]
public async Task<ActionResult> UpdatePassword(SvcUserPasswordUpdateViewModel viewModel)
{
viewModel.UserId = viewModel.UserId ?? ApplicationUserId;
var user = await UserManager.FindByIdAsync(viewModel.UserId);
var serviceResponse = new ServiceResponseObject();
if (!ModelState.IsValid)
{
this.Response.StatusCode = 422;