Skip to content

Instantly share code, notes, and snippets.

View mjsorribas's full-sized avatar

Maximiliano José Sorribas mjsorribas

View GitHub Profile
@mjsorribas
mjsorribas / airports.sql
Created May 20, 2016 18:09 — forked from tanerdogan/airports.sql
airports.sql - airport list (total 8800 airport)
This file has been truncated, but you can view the full file.
DROP TABLE IF EXISTS `airports`;
CREATE TABLE IF NOT EXISTS `airports` (
`code` varchar(50) COLLATE utf8_turkish_ci DEFAULT NULL,
`name` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL,
`cityCode` varchar(50) COLLATE utf8_turkish_ci DEFAULT NULL,
`cityName` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL,
`countryName` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL,
`countryCode` varchar(200) COLLATE utf8_turkish_ci DEFAULT NULL,
`timezone` varchar(8) COLLATE utf8_turkish_ci DEFAULT NULL,
@mjsorribas
mjsorribas / countries.sql
Created May 20, 2016 18:25 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@mjsorribas
mjsorribas / check-apache-instances.sh
Created April 7, 2018 20:47 — forked from heartshare/check-apache-instances.sh
Script to determine Apache ServerLimit and MaxClients.
#!/bin/sh
ps -ylC httpd --sort:rss | awk '{ s += $8; } END \
{ print "Average Size:", s/NR/1024, "MB,", NR, \
"servers, Total usage:", (s/NR/1024)*NR, "MB, Max Servers:", \
6500/(s/NR/1024) }'
@mjsorribas
mjsorribas / apache-prefork-tune.sh
Created April 7, 2018 20:58 — forked from moraleslevi/apache-prefork-tune.sh
This is a script you can run on apache servers to help calculate MaxRequestWorkers/ServerLimit based on available free memory.
#!/bin/bash
echo -e "\n*** Memory Output ***\n"
free -m
echo -e "\nEnter the amount of free memory (in MB), followed by [ENTER]:"
read FREE
@mjsorribas
mjsorribas / apache_tune.bash
Created April 7, 2018 21:04 — forked from dcai/apache_tune.bash
Apache Performance Tuning BASH Script
#!/bin/bash
# http://blog.strictly-software.com/2013/07/apache-performance-tuning-bash-script.html
echo "Calculate MaxClients by dividing biggest Apache thread by free memory"
if [ -e /etc/debian_version ]; then
APACHE="apache2"
elif [ -e /etc/redhat-release ]; then
APACHE="httpd"
fi
APACHEMEM=$(ps -aylC $APACHE |grep "$APACHE" |awk '{print $8'} |sort -n |tail -n 1)
APACHEMEM=$(expr $APACHEMEM / 1024)
@mjsorribas
mjsorribas / gist:53571588eac1de8e6a00e5fa8337e72a
Created June 4, 2018 19:30 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@mjsorribas
mjsorribas / install_spark_centos7.sh
Created July 16, 2019 13:46 — forked from darcyliu/install_spark_centos7.sh
Install Spark on CentOS 7
#!/bin/bash
# Install Spark on CentOS 7
yum install java -y
java -version
yum install wget -y
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz
tar xvf scala-2.11.7.tgz
sudo mv scala-2.11.7 /usr/lib
sudo ln -s /usr/lib/scala-2.11.7 /usr/lib/scala
@mjsorribas
mjsorribas / css-media-queries-cheat-sheet.css
Created November 27, 2019 17:41 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@mjsorribas
mjsorribas / media-query.css
Created November 28, 2019 16:34 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@mjsorribas
mjsorribas / clover_boot_flags.md
Created January 22, 2020 17:27 — forked from pjobson/clover_boot_flags.md
Clover Boot Flags

Clover Boot Flags

Flag Description
-v Verbose Mode
-x Safe Mode
-s Single User Mode
-no-zp Zone Postponing (use if hanging)
cpus=1 Single CPU Core Mode
-f No Kext Cache Mode (use if hanging)