Skip to content

Instantly share code, notes, and snippets.

View emildimitrov's full-sized avatar
🕶️

Emil Dimitrov emildimitrov

🕶️
View GitHub Profile
@dshaw
dshaw / application.js
Created June 8, 2011 17:43 — forked from fabware/application.js
socket.io application and haproxy configuration
var express = require('express');
var redis = require('redis');
const serverType = process.argv[2];
const serverHost = process.argv[3];
const serverPort = parseInt(process.argv[4]);
const redisPort = 6379;
const redisHost = '127.0.0.1';
@kevinbull
kevinbull / redis_tcp.sh
Last active December 28, 2018 11:22
Vagrant - Redis Provisioning Script
#!/usr/bin/env bash
echo "updating yum"
sudo yum update
echo "installing git"
sudo yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel git-core
echo "adding rpm repository"
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@jprante
jprante / elasticsearch.yml
Created November 10, 2015 23:26
1.5.2 config
bootstrap:
mlockall: true
store:
index:
type: mmapfs
network:
host: _local_
@jordansissel
jordansissel / comparison.md
Created February 11, 2012 08:42
DynamoDB is silly expensive
@emildimitrov
emildimitrov / microservices-readme-standard.md
Last active September 18, 2022 17:52
Creating microservice readme

example-system-name

CircleCI Coverage Status

The idea for those badges is that the dev can quickly see the status of the tests & their coverage

Description

@mholt
mholt / transcript
Created February 26, 2016 18:42
Is it necessary to consume response body before closing it (net/http client code)?
mholt [9:10 AM]
When using http.Get(), is it really necessary to read the full response body just to close it later?
[9:10]
The docs keep saying `Caller should close resp.Body when done reading from it.` and I keep seeing code like this:
```
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
```
@octate
octate / elasticsearch-statefulset.yaml
Last active January 16, 2023 07:22
Explaining elasticsearch stateful config file
apiVersion: apps/v1beta1 # API version of kubernetes in which `StatefulSet` is available. For Kubernetes 1.8.7 its apps/v1beta1
kind: StatefulSet # Type of resource that we are creating
metadata: # Holds metadata for this resource
name: es # Name of this resource
labels: # Extra metadata goes inside labels. It is for stateful resource
component: elasticsearch # Just a metadata we are adding
spec: # Holds specification of this resource
replicas: 3 # Responsible for maintaining the given number of replicas
serviceName: elasticsearch # Name of service, required by statefulset
template: # Template holds the spec of the pod that will be created and maintained by statefulset
@Warry
Warry / Article.md
Created December 11, 2012 00:11
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@tamas-molnar
tamas-molnar / kubectl-shortcuts.sh
Last active March 3, 2024 09:09
aliases and shortcuts for kubectl
alias kc='kubectl'
alias kclf='kubectl logs --tail=200 -f'
alias kcgs='kubectl get service -o wide'
alias kcgd='kubectl get deployment -o wide'
alias kcgp='kubectl get pod -o wide'
alias kcgn='kubectl get node -o wide'
alias kcdp='kubectl describe pod'
alias kcds='kubectl describe service'
alias kcdd='kubectl describe deployment'
alias kcdf='kubectl delete -f'
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js