Skip to content

Instantly share code, notes, and snippets.

{
// Controls the font family.
"editor.fontFamily": "Fira Code Light, Consolas, monospace",
"http.proxy": "",
"window.restoreWindows": "none",
"editor.fontSize": 15,
"editor.accessibilitySupport": "off",
"editor.tabCompletion": true,
@saga
saga / UserValidator.cs
Created September 13, 2017 16:22 — forked from GrantByrne/UserValidator.cs
Using Fluent Validation with WPF - Dead Simple
using System.Text.RegularExpressions;
using FluentValidation;
using WpfFluentValidationExample.ViewModels;
namespace WpfFluentValidationExample.Lib
{
public class UserValidator : AbstractValidator<UserViewModel>
{
public UserValidator()
{
@saga
saga / compile_stdlib.py
Created July 26, 2016 16:36 — forked from madebyjazz/compile_stdlib.py
Compile all Python scripts into single StdLib.dll .NET assembly
# Script below is based on following post:
# IronPython: EXE compiled using pyc.py cannot import module "os" - Stack Overflow
# http://stackoverflow.com/questions/6195781/ironpython-exe-compiled-using-pyc-py-cannot-import-module-os
import sys
sys.path.append('d:/projects/SomeProject/Libs/IronPython')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Lib')
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Tools/Scripts')
import clr
@saga
saga / useshapeways.py
Created March 25, 2016 17:33 — forked from sbaer/useshapeways.py
shapeways sample
"""Sample script that accesses the shapeways API
http://www.shapeways.com/api
"""
import wsdlprovider
wsdl_url = "http://api.shapeways.com/v1/wsdl.php"
username = "username"
password = "password"
application_id = "rhinotest"
@saga
saga / index.js
Created February 26, 2016 08:03 — forked from max-mapper/index.js
requirebin sketch
var graph = require('ngraph.generators').noLinks(142);
graph.forEachNode(assignNiceColor);
var clickMe = document.createElement('h1')
clickMe.setAttribute('style', 'font-family: Helvetica, Arial; font-weight: 200; text-align: center; margin-top: 150px;')
clickMe.innerHTML = 'CLICK ME'
document.body.appendChild(clickMe)
var svg = require('ngraph.vivasvg')(graph);
svg.nodeTemplate("<circle r='5' fill='{{node.color}}'></circle>");
@saga
saga / gitconfig-git
Created February 19, 2016 06:28 — forked from stevenh512/gitconfig-git
URL rewriting in .gitconfig
# Use git and git+ssh instead of https
[url "git://github.com/"]
insteadOf = https://github.com/
[url "git@github.com:"]
pushInsteadOf = "git://github.com/"
[url "git@github.com:"]
pushInsteadOf = "https://github.com/"
@saga
saga / adams-heroku-values.md
Created January 19, 2016 08:06 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

var Col = require('react-bootstrap/lib/Col')
var PageHeader = require('react-bootstrap/lib/PageHeader')
var React = require('react')
var Row = require('react-bootstrap/lib/Row')
var {connect} = require('react-redux')
var {reduxForm} = require('redux-form')
var DateInput = require('./DateInput')
var FormField = require('./FormField')
var LoadingButton = require('./LoadingButton')
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Shouldly;
using System;
using System.Net;
using System.Net.Security;
namespace NetVCR.Specs
{
[TestClass]
public class Verify_basic_proxy_functionality
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
class PDFHandler(webapp.RequestHandler):
def get(self):
self.response.headers['Content-Type'] = 'application/pdf'
self.response.headers['Content-Disposition'] = 'attachment; filename=my.pdf'
c = canvas.Canvas(self.response.out, pagesize=A4)
c.drawString(100, 100, "Hello world")