Skip to content

Instantly share code, notes, and snippets.

@ikbear
ikbear / Preferences.sublime-settings
Created December 23, 2016 09:47 — forked from LokiSharp/Preferences.sublime-settings
Sublime Text 3 设置翻译 by LokiSharp
//
// Sublime Text 3 设置翻译 by LokiSharp
//
{
// 主题文件的路径
"color_scheme": "Packages/User/SublimeLinter/Solarized (Dark) (SL).tmTheme",
// 设置字体和大小
"font_face": "inziu iosevka SC",
"font_size": 12,

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@ikbear
ikbear / pagination.md
Created February 5, 2016 15:17 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

@ikbear
ikbear / concurrency-in-go.md
Created December 31, 2015 06:35 — forked from kachayev/concurrency-in-go.md
Channels Are Not Enough or Why Pipelining Is Not That Easy
@ikbear
ikbear / springer-free-maths-books.md
Created December 28, 2015 15:41 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
@ikbear
ikbear / remove-docker-containers.md
Created November 18, 2015 05:57 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
@ikbear
ikbear / gist:bcfc3b814f0e70bcc436
Created October 1, 2015 03:03 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@ikbear
ikbear / gist:14e8efe091e9ed33ecc0
Created September 22, 2015 17:02 — forked from paulirish/gist:4158604
Learn JavaScript concepts with recent DevTools features

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.

Closures

Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

@ikbear
ikbear / what-forces-layout.md
Created September 22, 2015 16:53 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@ikbear
ikbear / Memory-Management.md
Last active September 12, 2015 15:34 — forked from githubutilities/Memory-Management.md
Memory Management