Skip to content

Instantly share code, notes, and snippets.

View techniq's full-sized avatar

Sean Lynch techniq

View GitHub Profile
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
@techniq
techniq / readme.md
Created December 2, 2013 03:26
Chrome Android force desktop version
adb shell 'echo \"chrome --user-agent="[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.23 Safari/537.36]"\" > /data/local/chrome-command-line'
@techniq
techniq / background-color-rgba-mixin.scss
Created October 18, 2013 19:31
SCSS / Modernizer RGBA background-color mixin
@mixin background-color-rgba($red, $green, $blue, $alpha) {
$rgba: rgba($red, $green, $blue, $alpha);
background-color: transparent;
background-color: rgba($red, $green, $blue, $alpha);
.lt-ie9 & {
$ie-hex-color: ie-hex-str($rgba);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#{ie-hex-color}, endColorstr=#{ie-hex-color}); /* IE */
zoom: 1;
}
@techniq
techniq / general.md
Created October 17, 2013 14:15
Linux info

Find out what shell you are currently running

echo $0

Pass output of command to another as argument

using backtick (`)

somecommand `anothercommand`
@techniq
techniq / clearfix_legacy.scss
Created October 11, 2013 01:25
Clearfix mixin clearfix_legacy.scss supports IE6+ clearfix_modern.scss is simplier and supports IE8+
// http://nicolasgallagher.com/micro-clearfix-hack/
// http://css-tricks.com/snippets/css/clear-fix/
@mixin clearfix {
// For modern browsers
&:before, &:after {
content: "";
display: table;
}
&:after {
clear: both;
using System;
using System.Collections.Generic;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
[XmlRoot("dictionary")]
public class XmlSerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
{
public XmlSchema GetSchema()
public class MvcApplication : HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
SetupIoc();
}
@techniq
techniq / remoting.ps1
Last active June 28, 2016 23:37
PowerShell remoting
Enable-PSRemoting
$creds = Get-Credential
Enter-PSSession -ComputerName [NAME] -Credentials $creds
Invoke-Command -ComputerName [NAME] -Credentials $creds { get-UICulture }
http://www.thecodeking.co.uk/2011/02/winrm-with-mixed-domain-environments.html
http://technet.microsoft.com/en-us/library/hh849707.aspx
@techniq
techniq / bootstrap-validation.js
Created June 11, 2013 14:46
jQuery Validation with Twitter Bootstrap
$("#someForm").validate({
errorClass:'error',
validClass:'success',
errorElement:'div',
highlight: function (element, errorClass, validClass) {
$(element).parents("div[class='control-group']")
.addClass(errorClass)
.removeClass(validClass);
},
unhighlight: function (element, errorClass, validClass) {
@techniq
techniq / smtp_debug.sh
Created May 6, 2013 14:01
Create an SMTP server which prints mail to stdout
python -m smtpd -n -c DebuggingServer localhost:1025