Skip to content

Instantly share code, notes, and snippets.

View nisrulz's full-sized avatar
🌌
Coding in the MultiVerse

Nishant Srivastava nisrulz

🌌
Coding in the MultiVerse
View GitHub Profile
@nisrulz
nisrulz / .gitconfig
Created July 13, 2016 06:18 — forked from donnfelker/.gitconfig
My .gitconfig
[user]
name = Your Name
email = you@youremail.com
[alias]
A = add -A
a = add
aa = add --all
ae = add --edit
ai = add --interactive
amend = commit --amend -C HEAD

Keybase proof

I hereby claim:

  • I am nisrulz on github.
  • I am nisrulz (https://keybase.io/nisrulz) on keybase.
  • I have a public key whose fingerprint is 664A 14E8 F9BA 8779 CF16 130D F526 A6BB E32F C33D

To claim this, I am signing this object:

@nisrulz
nisrulz / responsive.css
Created September 13, 2016 12:20
Media Queries for mobile
/* Media Queries */
/* ----------- iPhone 4 and 4S ----------- */
/* Portrait and Landscape */
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2) {
@nisrulz
nisrulz / importcsvintomysql.py
Last active December 29, 2016 00:45
MySQL connection in python
import MySQLdb
import pandas as pd
from sqlalchemy import create_engine
# read the csv into pandas and then export to MySQL
template_lines = 1000
df = pd.read_csv(
'example.csv', nrows=template_lines, low_memory=False)
# 2nd argument replaces where conditions is False
df = df.where(pd.notnull(df), None)

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

A good commit message looks like this:
Header line: explaining the commit in one line
Body of commit message is a few lines of text, explaining things
in more detail, possibly giving some background about the issue
being fixed, etc etc.
The body of the commit message can be several paragraphs, and
please do proper word-wrap and keep columns shorter than about
@nisrulz
nisrulz / Android Privacy Policy Template
Created February 12, 2017 02:06 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
<html>
<body>
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
@nisrulz
nisrulz / EasyDeviceInfoPrivacyPolicy.html
Last active March 4, 2017 23:24
Privacy Policy for EasyDeviceInfo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Privacy Policy - EasyDeviceInfo</title>
<style>
body{
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
@nisrulz
nisrulz / PackageHunterPrivacyPolicy.html
Last active March 5, 2017 01:29
Privacy Policy for PackageHunter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Privacy Policy - PackageHunter</title>
<style>
body{
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;