Skip to content

Instantly share code, notes, and snippets.

View desaiuditd's full-sized avatar
🚀

Udit Desai desaiuditd

🚀
View GitHub Profile
@desaiuditd
desaiuditd / meteor-nginx-proxy-config.conf
Last active July 25, 2016 17:55
Meteor Nginx Proxy Config
server {
server_name example.com www.home.example.com;
access_log /var/log/nginx/example.com.access.log ;
error_log /var/log/nginx/example.com.error.log;

Keybase proof

I hereby claim:

  • I am desaiuditd on github.
  • I am desaiuditd (https://keybase.io/desaiuditd) on keybase.
  • I have a public key whose fingerprint is 2C76 0DDF EAF3 3C66 B687 FCFB 7F21 FD23 2244 74F5

To claim this, I am signing this object:

@desaiuditd
desaiuditd / ucfirst.java
Created February 16, 2016 21:26 — forked from jimjam88/ucfirst.java
Java mimic of PHP's ucfirst function
/**
* Mimics PHP's ucfirst function.
*
* @param subject The string to be ucfirst'd
* @return The subject string with an uppercased first character
*/
final public static String ucfirst(String subject)
{
return Character.toUpperCase(subject.charAt(0)) + subject.substring(1);
}
@desaiuditd
desaiuditd / SortLL_src_sortll_SortLL.java
Last active January 23, 2016 01:46
Sort Linked List
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package sortll;
/**
*
* @author Pooja
@desaiuditd
desaiuditd / wiki.md
Created August 3, 2015 13:40
Linode-EasyEngine

Easy Engine on Linode

Overall Installation of Easy Engine on Linode

Basic Linux Configurations for day to day operation

  1. Choose overall linode plan
  2. Configure Linode server based on EE Guidelines Ubuntu 64bit 14.04 LTS distro. Note: Make sure to configure swap based on guidlines link
  3. Login to Linode via SSH with root user.
  4. Setup www-data as day to day user.(document password and pass along to project lead)
  • www-data user already exists in the system. So we just need to enable its ssh login & set its password.
  • vim /etc/passwd
@desaiuditd
desaiuditd / git-clone-non-empty-directory.md
Last active August 29, 2015 14:21 — forked from davisford/gist:5039064
git clone in non-empty directory

Let's say you start a project locally, and do some editing.

$ mkdir -p ~/git/foo && cd ~/git/foo
$ touch NEWFILE

Now you decide you want to create a new github repo and track it, but the directory is non-empty so git won't let you clone into it. You can fix this, thusly:

@desaiuditd
desaiuditd / get_meta.py
Last active August 29, 2015 14:21 — forked from jeffaudi/get_meta.py
This python script uses the Airbus Geo Catalog API to retrieve the meta-data associated to a list of imagery identifiers
# Script : get_meta.py
# Source : https://gist.github.com/jeffaudi/9fcac727cf6251287ecc/
# Copyright (c) 2014, Jeff Faudi
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.
{
"staging": {
"destination": "/var/www/staging.example.com/htdocs/",
"hostname": "staging.example.com",
"username": "www-data",
"port": 22,
"sshLocalPath": "/home/udit/.ssh/id_rsa"
},
"production": {
"destination": "/var/www/example.com/htdocs/",
@desaiuditd
desaiuditd / deploy.json
Last active December 3, 2020 16:29
Gulp rsync Deploy
{
"staging": {
"themeName": "example",
"destination": "/var/www/staging.example.com/htdocs/wp-content/themes/",
"root": "wp-content/themes/example",
"releasesDirectory": "/var/www/staging.example.com/releases/",
"hostname": "staging.example.com",
"username": "www-data",
"port": 22
},