Skip to content

Instantly share code, notes, and snippets.

View varun-raj's full-sized avatar

Varun Raj Manoharan varun-raj

View GitHub Profile
@varun-raj
varun-raj / Passenger_Nginx_Module_Init_Script
Created June 1, 2015 11:29
Passenger Nginx Module Init Script
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
server
{
listen 2662;
server_name example.com .example.com;
root /home/varunraj/Projects/php-project/;
index index.html index.htm index.php;
location ~* \.(ico|css|js|gif|jpe?g|png)$
{
@varun-raj
varun-raj / dropbox_import.rb
Last active September 26, 2016 04:26
dropbox_import.rb
require 'dropbox_sdk'
require 'fileutils'
require 'sinatra'
require 'sinatra/reloader'
$client = DropboxClient.new("YOUR KEY HERE")
$path = "/"
$root_path = "/Users/skcripthq/Projects/DropBox"
@varun-raj
varun-raj / firebase_config.js
Last active December 9, 2016 04:11
Firebase + React Native Code
import * as firebase from "firebase";
var config = {
apiKey: "<YOUR API KEY GOES HERE >",
authDomain: "<YOUR APP DOMAIN GOES HERE>",
databaseURL: "<YOUR DATABASE URL>",
};
firebase.initializeApp(config);
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
TouchableHighlight,
View,
AsyncStorage
} from 'react-native';
var cycles = [
{
id: 1,
name: "Cycle 1",
start_date: "01/01/2017",
end_date: "02/28/2017",
},
{
id: 2,
{
"swagger": "2.0",
"info": {
"version": "0.1.0",
"title": "SSMS Worker API"
},
"host": "34.250.112.30:3001",
"paths": {
"/api/systemtoken": {
"post": {
@varun-raj
varun-raj / k.json
Last active October 16, 2017 09:32
{
"swagger": "2.0",
"info": {
"version": "0.2.0",
"title": "SSMS Worker API"
},
"host": "18.194.193.140:3001",
"paths": {
"/api/systemtoken": {
"post": {
@varun-raj
varun-raj / ExtendedSearchBarRenderer.cs
Created December 28, 2018 12:48 — forked from xleon/ExtendedSearchBarRenderer.cs
Xamarin.Forms renderer to hide the "Cancel" button of a SearchBar on iOS
using System;
using Xamarin.Forms.Platform.iOS;
using Xamarin.Forms;
using UIKit;
using System.Diagnostics;
[assembly: ExportRenderer(typeof(SearchBar), typeof(Namespace.iOS.Renderers.ExtendedSearchBarRenderer))]
namespace Namespace.iOS.Renderers
{
sudo mkdir /opt/oracle
sudo chown -R $USER:$USER /opt/oracle
cd /opt/oracle
wget https://github.com/bumpx/oracle-instantclient/raw/master/instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip
sudo apt-get install unzip
sudo apt-get install libaio1
unzip instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip