Skip to content

Instantly share code, notes, and snippets.

View kadmil's full-sized avatar
🧙‍♂️

Kadmil kadmil

🧙‍♂️
View GitHub Profile
@kadmil
kadmil / ServiceStackDictionarySerialize
Created May 16, 2013 08:39
Gist showing serialization issue.
[Route("/tmp")]
public class Tmp:IReturn<TmpResponse>
{
public string Param { get; set; }
}
public class TmpResponse
{
public Dictionary<KeyClass, List<ResponseData>> ResponseOptions { get; set; }
}
@kadmil
kadmil / designer.html
Last active August 29, 2015 14:06
designer
<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-header-panel/core-header-panel.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="canvas-section">
<template>
<style>
:host {
@kadmil
kadmil / 0_package.json
Last active August 29, 2015 14:17
PostCSS-only gulp setup
"dependencies": {
"autoprefixer-core": "^5.1.8",
"csswring": "^3.0.2",
"gulp": "~3.8.10",
"postcss": "^4.0.4",
"postcss-custom-properties": "^3.0.1",
"postcss-import": "^5.0.2",
"postcss-mixins": "^0.1.1",
"postcss-nested": "^0.2.1",
},
@kadmil
kadmil / mappingSketch.js
Last active November 30, 2015 05:04
Mapping normalized state to tree-like view model
const initPosts = [{
id: 1,
author: 1,
comments:[1,2]
}
]
const initComments = [
{id: 1, author: 1},
{id: 2, author: 2}
@kadmil
kadmil / Child.ts
Last active December 4, 2015 14:36
Angular2 (2.0.0-alpha.44) pass parameters from your own component event (look at template for parent)
import {Component} from 'angular2/angular2'
@Component({
selector: 'child',
template: '<div (click)='passNumber.next(num)'/>',
})
export default class Login {
public num: number = 1
@Output() passNumber = new EventEmitter()
@kadmil
kadmil / first.css
Last active May 9, 2016 16:26
Before CSS Modules
.title {
border: 1px solid red;
}
@kadmil
kadmil / result.css
Created May 9, 2016 16:19
CSS Modules result
.title_urururu_first_random_timestamp {
border: 1px solid red;
}
.title_arara_second_random_timestamp {
border: 3px dashed blue;
}
@kadmil
kadmil / module loaders.js
Last active May 9, 2016 16:20
Webpack to the rescue
{
test: /\.css$/,
loader: ExtractTextPlugin.extract(‘style-loader’, ‘!css-loader?modules&importLoaders=1!stylus-loader’)
},
@kadmil
kadmil / my-component.css
Last active May 9, 2016 16:24
React component and CSS Modules
.title {
border: 1px solid red;
}
@kadmil
kadmil / global.css
Created May 9, 2016 16:23
Global CSS Modules namespacing
:global(.myClass) {
//here go styles for all .myClass classes
}