Skip to content

Instantly share code, notes, and snippets.

View nurrony's full-sized avatar

Nur Rony nurrony

View GitHub Profile
@nurrony
nurrony / restore-mongodb-collections
Last active September 16, 2015 06:04
Restore all MongoDB collections from directory contains BSON files
#!/usr/bin/env bash
#Author nmrony<[email protected]>
#you need to download it and give execution permission to run it
#handle errors
function die(){
echo $1;
exit 1;
}
@nurrony
nurrony / .eslintrc.js
Last active September 21, 2015 15:09 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@nurrony
nurrony / GoProStreamKeepAlive.py
Last active May 19, 2018 05:24
Keep alive the GoPro Hero 4 Black/Silver Stream
#Go to http://10.5.5.9:8080/gp/gpControl/execute?p1=gpStream&c1=restart before running this script
import socket
import sys
from time import sleep
def get_command_msg(id):
return "_GPHD_:%u:%u:%d:%1lf\n" % (0, 0, 2, 0)
UDP_IP = "10.5.5.9"
UDP_PORT = 8554
@nurrony
nurrony / introrx.md
Created November 21, 2015 09:33 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@nurrony
nurrony / ubuntu-nginx-init-script
Last active October 12, 2018 21:40
Nginx init script for Ubuntu 14.04/14.10. Basically a copy of @JasonGiedymin but path is changed to use for default installation path of Nginx `/etc/nginx` using `apt-get`
#! /bin/sh
### BEGIN INIT INFO
# 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 or other *nix.
# Description: nginx init.d dash script for Ubuntu or other *nix.
### END INIT INFO
@nurrony
nurrony / install-php7.2.sh
Last active May 26, 2021 15:55
Installing PHP 7.2
# remove php5 modules
sudo apt-get autoremove --purge php5-* && \
sudo apt-get install -y language-pack-en-base && \
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php -y && sudo apt-get update && \
sudo apt-get install -y php7.2 \
php7.2-cgi \
php7.2-cli \
php7.2-curl \
php7.2-imap \
php7.2-ldap \
@nurrony
nurrony / ghost-buster.sh
Created January 5, 2016 16:38
Installing Buster
#Install pip and other dependencies
sudo apt-get install python-dev python-pip libxslt-dev libxml2-dev
sudo pip install buster
@nurrony
nurrony / upgrade-guest-addition-vagrantbox.sh
Created January 17, 2016 11:49
Update VirtualBox Guest Additions in Vagrant box
nurrony@devmachine:vagrant-playbox$ vagrant up
#Let it finish the initial tasks to boot up your vagrant box
nurrony@devmachine:vagrant-playbox$ vagrant ssh
vagrant@vagrant-playbox:~$ sudo yum -y update
vagrant@vagrant-playbox:~$ cd /opt
vagrant@vagrant-playbox:~$ sudo wget -c http://download.virtualbox.org/virtualbox/5.0.12/VBoxGuestAdditions_5.0.12.iso -O VBoxGuestAdditions_5.0.12.iso
vagrant@vagrant-playbox:~$ sudo mount VBoxGuestAdditions_5.0.12.iso -o loop /mnt
vagrant@vagrant-playbox:~$ cd /mnt
vagrant@vagrant-playbox:~$ sudo sh VBoxLinuxAdditions.run --nox11
vagrant@vagrant-playbox:~$ cd /opt
@nurrony
nurrony / counter.es5.js
Last active January 28, 2016 10:14
Very Simple Counter Example with Ract and Redux
/////////////////// REACT PART
'use strict';
var Counter = function Counter(_ref) {
var value = _ref.value;
var onIncrement = _ref.onIncrement;
var onDecrement = _ref.onDecrement;
return React.createElement(
'div',
@nurrony
nurrony / configuration.md
Last active July 10, 2020 15:39
Auto git push script to post Ghost blog to Github Pages

Assumption

I am asumming that you have following this already taken care in your dev machine

  1. Fully configured up and running [Ghost][1] blog
  2. Successfully installed [Buster][2] Script
  3. Already have Git Page for your account

Instructions