Skip to content

Instantly share code, notes, and snippets.

View anistark's full-sized avatar
💻
Open Innovation and Development

Ani anistark

💻
Open Innovation and Development
View GitHub Profile
@anistark
anistark / at_ssh
Last active February 26, 2016 07:07
ssh permission granting
To check if your system/user has the permission required:
> ssh -T git@github.com
If you want detail reports:
> ssh -vT git@github.com
In case you get error as permission denied, load you ssh keys using this:
# start the ssh-agent in the background
> eval 'ssh-agent -s'
Say your code resides in a dir called project/ locally and you want to push it up to an empty repo on github. Then, if your repo is called, say, foo, get its URL, e.g., https://github.com/sneha/foo.git and do
git remote add origin https://github.com/sneha/foo.git
from your project/ dir. After that, add files using `git add`. Use the followinng for all files:
git add .
Then commit changes
@anistark
anistark / gh-pages
Last active August 29, 2015 14:04
Github Pages
To get started with gh-pages, you should know what gh-pages is first. If you know, proceed here..
Supposing you already have a git repo open on your terminal with the default branch, master
To switch to a new branch, gh-pages:
git checkout --orphan gh-pages
--orphan creates a branch gh-pages with no parent.
Now you would wanna remove all files from the old working tree:
git rm -rf .
@anistark
anistark / hovercard
Created September 4, 2014 12:19
Hovercard Demo
HTML Part
==========
<div class="highlight">Hover over my name.</div>
This demo was prepared by <label id="profile">Kumar Anirudha</label>.<br />
For Demo purposes. Blah blah. Fill up anything you like.<br /><br />Open Source Enthusiast.
JavaScript Part
===============
@anistark
anistark / laravel-package
Last active February 4, 2017 07:53
Packaging of Laravel website
So, you're done making the website or web-app and now you would wanna distribute it to your clients. Awesome. Let's go ahead and create a package for the same.
There are two types of packaging that can be done in laravel:
1. VPS
2. Shared
VPS
VPS version is for their own use and local testing. So, you would wanna keep it as close to your local system settings as possible.
1. Delete all the files from app/storage/ in the following folders:
cache
@anistark
anistark / ssh file commands
Last active August 29, 2015 14:13
ssh file commands
Copy from server to local:
scp your_username@remotehost.edu:foobar.txt /some/local/directory
scp local/file user@xx.x.x.xx:/var/www
@anistark
anistark / index.js
Last active August 29, 2015 14:16 — forked from jfensign/index.js
//index.js
var express = require('express'),
app = module.exports = express.createServer(),
mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/nodeAuth');
//configure app
app.configure(function() {
app.set('views', __dirname + '/views');
@anistark
anistark / Node Notes
Last active December 2, 2015 08:56
npm throws error without sudo
sudo chown -R $(whoami) ~/.npm
sudo chown -R `whoami` /usr/local/lib/node_modules
sudo sysctl fs.inotify.max_user_watches=524288
@anistark
anistark / phabricator
Created July 4, 2015 11:53
Getting started with phabricator
0) git status; git diff - review, then git diff with the file names that you have changed for this commit.
~ git status
~ git diff
~ git diff file1 file2 file3 > featurename.patch
1) Login to phabricator, go to differential, create diff.
2) Upload the patch file, type your repository name, continue
@anistark
anistark / material_design
Last active March 23, 2018 14:03
Material Design Quick Presentation
Slide 1
Title: Introduction
Content: Material Design (codenamed Quantum Paper) is a design language developed by Google.
Slide 2
Title: For Mobile
Content: Google Android Material design
https://developer.android.com/design/material/index.html for android
https://github.com/nghialv/MaterialKit for ios