Skip to content

Instantly share code, notes, and snippets.

View himelnagrana's full-sized avatar

Himel Nag Rana himelnagrana

View GitHub Profile
@himelnagrana
himelnagrana / Setting up mongoDB in Ubuntu or Mint
Created March 25, 2014 08:32
Setting up mongoDB in Ubuntu or Mint
sudo apt-get update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update
sudo apt-get install mongodb-10gen
# Install and use menlo font-patch from: https://gist.github.com/qrush/1595572
# Setting GIT prompt
b_black=`tput setab 0`
b_red=`tput setab 9`
b_green=`tput setab 2`
b_cyan=`tput setab 14`
b_white=`tput setab 15`
f_black=`tput setaf 0`
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb
sudo dpkg -i elasticsearch-1.1.1.deb
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
if tput setaf 1 &> /dev/null; then
tput sgr0
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
MAGENTA=$(tput setaf 9)
@himelnagrana
himelnagrana / Assignment on ReactJS
Last active November 22, 2017 11:20
Assignment on ReactJS
<h1 id="assignment-on-reactjs">Assignment on ReactJS</h1>
<p>Hey! This is the first assignment in the <strong>React Native course</strong><a href="#fn:reactnativecourse" id="fnref:reactnativecourse" title="See footnote" class="footnote">1</a>. </p>
<hr>
<h2 id="description">Description</h2>
@himelnagrana
himelnagrana / rn_cefalo_school_class_6_code_sample_1.js
Last active November 29, 2017 05:39
Sample React Native Code
import React, { Component } from 'react';
import { Text, View } from 'react-native';
class WhyReactNativeIsSoGreat extends Component {
render() {
return (
<View>
<Text>
If you like React on the web, you'll like React Native.
</Text>
import React, { Component } from 'react';
import { Image, ScrollView, Text } from 'react-native';
class AwkwardScrollingImageWithText extends Component {
render() {
return (
<ScrollView>
<Image
source={{uri: 'https://i.chzbgr.com/full/7345954048/h7E2C65F9/'}}
style={{width: 320, height:180}}
@himelnagrana
himelnagrana / Cefalo School - React Native Class 06.md
Last active November 29, 2017 09:58
Cefalo School - React Native Class 06

Cefalo School - React Native Class 06


BASICS

  • Build native mobile apps using JavaScript and React

Sample Code 1

  • With React Native, you don't build a mobile web app, an HTML5 app, or a hybrid app. You build a real mobile app that's indistinguishable from an app built using Objective-C or Java.
@himelnagrana
himelnagrana / Cefalo School - React Native Class 07.md
Created December 6, 2017 11:26
Cefalo School - React Native Class 07

Cefalo School - React Native Class 07


REACT NATIVE APIs

  • React Native provides a number of built-in components.There are a number of APIs for both the platforms (common and individuals).

Components and APIs

@himelnagrana
himelnagrana / CalendarManager.h
Created January 3, 2018 05:19
iOS Native Modules
#import <React/RCTBridgeModule.h>
@interface CalendarManager : NSObject <RCTBridgeModule>
@end