Skip to content

Instantly share code, notes, and snippets.


Talgat Uspanov talgautb

Block or report user

Report or block talgautb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Iverson / http.spec.ts
Created Feb 24, 2017
Angular custom Http service test
View http.spec.ts
import { Injector } from '@angular/core'
import { HttpModule, RequestOptions, XHRBackend, Http, Response, ResponseOptions, ResponseType } from '@angular/http'
import { inject, TestBed } from '@angular/core/testing'
import { MockBackend, MockConnection } from '@angular/http/testing'
import { AuthService } from './auth.service'
import { Oauth2Http } from './http'
import { CookieService } from '../../cookie/ng2'
import { MockError } from '../../util/ng2/test'
View thumbRatio.styl
* Блок тумбнеила
* Ширина задается числом колонок сетки (добавлением классов grid_col_1, grid_col_2...)
* Высота вычисляется согласно пропорции (_ratio), в процентах от ширины
display inline-block
background center center no-repeat
background-size cover

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets!

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

cvrebert /
Last active Sep 27, 2019
Click and focus behavior across browsers & OSes

Test apparatus:

(Windows = Windows 8.1 desktop)

  • Windows Chrome 39
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Firefox 30.0
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Internet Explorer 11
hdragomir / sm-annotated.html
Last active Dec 7, 2019
The deferred font loading logic for Smashing Magazine.
View sm-annotated.html
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
You can’t perform that action at this time.