Skip to content

Instantly share code, notes, and snippets.

Nur Rony nmrony

Block or report user

Report or block nmrony

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View iOS Media Queries.css
.ipad-only, .iphone-only, .retina-only, .non-retina-only, .retina-iphone-only, .non-retina-iphone-only { display: none; }
/* ---------- iPad Only ---------- */
@media only screen and (device-width: 768px) {
.ipad-only { display: block; }
/* ---------- iPhone/iPod Only ---------- */
@media only screen and (device-width: 320px) {
.iphone-only { display: block; }
View how-to-run-apache-and-node.js-together-the-right-way.markdown

Step 1

Get a VPS that offers 2 or more IP addresses.

Step 2

From the WHM cPanel, find the menu item Service Configuration, select Apache Configuration and then click on Reserved IPs Editor.

Step 3

View gist:041613e98d9f1ca0aae4

HLS streaming from node

Provided that you already have a file or stream segmenter generating your .m3u8 playlist and .ts segment files (such as the ffmpeg 'hls' muxer), this little node server will serve up those files to an HLS compatible client (e.g. Safari). If you're using node for your streaming app already, this obviates the need to serve the HLS stream from a separate web server.

loosely based on

// loosely based on
// requires node.js >= v0.10.0
// assumes that HLS segmenter filename base is 'out'
// and that the HLS playlist and .ts files are in the current directory
View Gruntfile.js
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
module.exports = function(grunt) {
// Sass
View statusCodes
100 Continue
101 Switching Protocols
102 Processing (WebDAV; RFC 2518)
200 OK
201 Created
202 Accepted
203 Non-Authoritative Information (since HTTP/1.1)
204 No Content
205 Reset Content
206 Partial Content
# Based on instructions found here:
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
cat > /etc/yum.repos.d/centos.repo<<EOF
nmrony / nginx-centos
Last active Aug 29, 2015
Nginx Init.d Script
View nginx-centos
#! /bin/sh
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: nginx init.d dash script for Ubuntu <=9.10.
# Description: nginx init.d dash script for Ubuntu <=9.10.
nmrony /
Last active Feb 10, 2019
Installing PHP to configure Nginx
#install dependencies
sudo add-apt-repository ppa:ondrej/php -y && sudo apt-get update && \
sudo apt-get install make \
php5.6 \
php5.6-mongo \
php-pear \
php5.6-dev \
php5.6-mysql \
php5.6-common \
php5.6-cli \
nmrony / kibana-initd-script-for-centos6
Last active Aug 29, 2015
Correct and working Logstash-forwarder init script for CentOS 5/6+
View kibana-initd-script-for-centos6
DESC="Kibana 4"
nmrony /
Last active Aug 29, 2015
AWS EB CLI installation

Install Python 2.7

sudo apt-get install python2.7

Install pip

You can’t perform that action at this time.