Skip to content

Instantly share code, notes, and snippets.

@linuxbender
linuxbender / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@linuxbender
linuxbender / NumbertextField.fxml
Last active August 29, 2015 14:13
Java FX NumbertextField Component - import jar to the SceenBuilder
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.*?>
<!--
The use of 'fx:root' and 'type="Node"' below is the 'magic'
that allows our custom component to inherit from, and therefore
customize, ANY JavaFX Node it wants to!
-->
<fx:root type="Node" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"/>
@linuxbender
linuxbender / .bashrc
Created December 4, 2014 01:30
SET JAVA ENV
export JAVA_HOME=/home/linuxbender/program/jdk1.8.0_20/
export PATH=$PATH:/home/linuxbender/program/jdk1.8.0_20/bin
#!/bin/bash
for file in $1/*.mp3
do
echo "file=$file"
mp3splt -f 0.10 5000.0 $file
if test "$?" == "0"; then
# cp $file $file"_backup"
rm $file
@linuxbender
linuxbender / core.css
Created December 31, 2012 01:44
Javascript: ScrollToTop
.topLink {
background: url('http://jquerymobile.com/demos/1.2.0/docs/toolbars/glyphish-icons/88-beermug.png') no-repeat;
position:fixed;
width: 30px;
height: 30px;
bottom:30px;
right:20px;
}
//
// FuncDemos
//
// Extensens.cs - 06.12.2012
//
// Author: glenn
using System;
using System.Net;
@linuxbender
linuxbender / LessImportResolver.cs
Created September 20, 2012 12:38
LessMinify.cs
using System.IO;
using System.Web;
using System.Web.Hosting;
using dotless.Core.Input;
namespace theForce.App_Start
{
public class LessImportResolver : IPathResolver
{
private string _currentFileDirectory;
foo.slice(0, foo.length - (foo.length - baa.length))
<!--<rewrite>
<rules>
<rule name="Redirect to HTTPS" enabled="true" stopProcessing="true">
<match url="^home" ignoreCase="true" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{HTTPS}" pattern="off" />
<add input="{HTTP_HOST}" pattern="([^/:]*?):[^/]*?" />
</conditions>
<action type="Redirect" url="https://{C:1}:44300/{REQUEST_URI}" />
</rule>
@linuxbender
linuxbender / gist:1786130
Created February 10, 2012 03:29
How to Unit Test Data Annotation Validators
[TestMethod]
public void Description_Should_Be_Required()
{
Expression<Func<MenuCategoryBusinessObject, object>> expression =
o => o.Description;
var me = expression.Body as MemberExpression;
var att = (RequiredAttribute[])me.Member
.GetCustomAttributes(typeof(RequiredAttribute), false);
att.Length.ShouldEqual(1);
}