Skip to content

Instantly share code, notes, and snippets.

View safarcik's full-sized avatar
:octocat:

Petr Safarcik safarcik

:octocat:
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@jednano
jednano / gitcom.md
Last active February 27, 2025 03:05
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

git init
@denji
denji / nginx-tuning.md
Last active April 21, 2025 11:07
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@codeinthehole
codeinthehole / osx_bootstrap.sh
Last active January 7, 2025 13:44
Script to install stuff I want on a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@kitze
kitze / api-service.js
Created December 28, 2015 23:34
lightweight wrapper around axios with a cache layer
//external libs
import Q from 'q';
import axios from 'axios';
import _ from 'lodash';
//modules
import CONSTANTS from '../helpers/constants';
import Notifications from '../helpers/notifications-service';
import ApiCache from '../helpers/cache';
import {setLocation} from '../helpers/location-changer';