Skip to content

Instantly share code, notes, and snippets.

View gutenye's full-sized avatar
:octocat:
Guten tag!

Guten gutenye

:octocat:
Guten tag!
View GitHub Profile
@grvcoelho
grvcoelho / clean-docker-disk-space.md
Created December 9, 2016 10:46
Some scripts to cleanup docker disk space

Stop all containers

$ docker stop (docker ps -aq)
$ docker rm (docker ps -aq)

Remove unused images and containers

@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

Angular2 + JSPM cheat sheet

First time setup

  • install jspm beta: npm install -g jspm@beta
  • set up your project: jspm init
  • install dependencies: jspm install angular2 reflect-metadata zone.js es6-shim

This will create a jspm_packages folder, and a config.js file.

Open the config.js file - this file manages options for the System.js loader - tweak it as appropriate

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@p1nox
p1nox / using_meld_on_mac.md
Last active June 13, 2023 16:24
Using meld on Mac

Using Meld merging tool on Mac

There are two ways of installing meld on osx (May 2023), using brew and .dmg package (from @yousseb). Since I found https://yousseb.github.io/meld/, I've installed it with .dmg package, but having macOS Ventura Version 13.4 (22F66) in place, it's not even starting for me. So I tried brew installation, and the application is working as expected, including symlink to start it from the terminal.

brew install --cask meld

# set meld as your default git mergetool
@gutenye
gutenye / ember-with-middleman.md
Last active December 10, 2015 01:58
Write Ember.js App With Middleman

I. Create a Middleman project with middleman-ember-template

$ middleman init hello --template=ember

II. Install ember.js package

$ bower install ember
@gutenye
gutenye / download-progress.rb
Created December 31, 2011 04:47 — forked from Burgestrand/download-progress.rb
Ruby HTTP file download with progress measurement
require 'net/http'
def download(url)
Thread.new do
thread = Thread.current
thread[:body] = []
thread[:done] = 0
url = URI(url)
Net::HTTP.new(url.host, url.port).get2(url.path) do |res|
@caseyohara
caseyohara / reserved_usernames.rb
Created December 9, 2011 22:58
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support