Skip to content

Instantly share code, notes, and snippets.

View piscis's full-sized avatar
🧱
¯\_(ツ)_/¯

Alex piscis

🧱
¯\_(ツ)_/¯
View GitHub Profile
const matrixRatingColums = [
{ value: 1, text: '1' },
{ value: 2, text: '2' },
{ value: 3, text: '3' },
{ value: 4, text: '4' },
{ value: 5, text: '5' },
{ value: 6, text: '6' }
];
// ....
{ type: 'matrix', name: 'matrix',
@denji
denji / nginx-tuning.md
Last active April 24, 2024 19:39
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

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.

@kaspergrubbe
kaspergrubbe / install-graphite-ubuntu-13.04.sh
Last active October 4, 2020 11:53 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Don't overwrite the local_settings.py
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 16. June 2013
####################################
# This is apparantly needed for python when running manage.py
# described here: http://stackoverflow.com/questions/11593556/django-createsuperuser-not-working
export LANG=en_US.UTF-8
@dergachev
dergachev / pantheon_monitoring_tools.md
Created May 22, 2013 21:30
Kyle monitoring tools: sensu, graphite, statsd

This is what they use.

@lobodin
lobodin / README.md
Last active March 30, 2023 06:23
Import GeoNames.org cities data to mongodb.

#Generate cities data

  1. wget http://download.geonames.org/export/dump/cities15000.zip
  2. unzip cities15000.zip
  3. node geonames.js cities15000.txt

The result is json array of cities in the following format:

{

_id:

@piscis
piscis / gist:1883583
Created February 22, 2012 09:27
Iphone like shortening function to short Text
var longText = "Super Duper Long Description from the manual for the dashboard";
var shortText = "Main Screen";
var shortTxt = function(txt,max,fill) {
var sTxt = txt,
max = max || 12,
fill = fill || '...';
if(txt.length>=max){
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@piscis
piscis / Test drive
Created December 21, 2011 09:54
Parallel & serial directory walker
walk(process.env.HOME, function(err, results) {
if (err) throw err;
console.log(results);
});
@piscis
piscis / gist:1324540
Created October 29, 2011 14:51
handy little bash innodb table converter
for t in $(mysql --batch --column-names=false -e "show tables" dbname |grep -v "exclude_this");
do
mysql -e "alter table $t engine=InnoDB" dbname;
done