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 / ShellSettings.txt
Created March 15, 2016 20:06
Shell Settings
Clarification: There are two default shell settings.
One is the Unix setting and can be changed with chsh -s.
The other is the Terminal.app-specific setting, and can be changed in Terminal preferences.
You can set your Terminal default shell command to /bin/bash -l in the Terminal app.
-l tells Bash to read startup files. Even if you don't have any user-specific startup files, there are system-wide startup files that will, among other things, set the prompt to the one you're familiar with.
If you've properly set your Unix default shell, you should be able to select Default login shell in Terminal preferences and this will happen automatically.
@anistark
anistark / ubuntuTricks.md
Created February 4, 2016 07:40
Ubuntu Tips n Tricks
find . -maxdepth 1 -name "*.pdf" -print0 | xargs -0 rm
@anistark
anistark / gist:95bf5d194478aad713e1
Created February 1, 2016 11:33 — forked from iwasrobbed/gist:1032395
Amazon S3 Query String Authentication for Ruby on Rails
def generate_secure_s3_url(s3_key)
#
# s3_key would be a path (including filename) to the file like: "folder/subfolder/filename.jpg"
# but it should NOT contain the bucket name or a leading forward-slash
#
# this was built using these instructions:
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?S3_QSAuth.html
# http://aws.amazon.com/code/199?_encoding=UTF8&jiveRedirect=1
s3_base_url = MyApp::Application::S3_BASE_URL # i.e. https://mybucket.s3.amazonaws.com
@anistark
anistark / bash_profile.txt
Created January 20, 2016 06:40
Basic Bash Profile
if [ -z "$SSH_AUTH_SOCK" ] ; then
eval `ssh-agent -s`
ssh-add ~/.ssh/delivery
fi
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
@anistark
anistark / slackforubuntu.sh
Created November 9, 2015 13:46
Slack For Ubuntu Install Script
sudo apt-get update;sudo apt-add-repository -y ppa:rael-gc/scudcloud;sudo apt-get update;sudo apt-get install scudcloud;sudo apt-get install hunspell-en-us;sudo dpkg-divert --add --rename --divert /opt/scudcloud/resources/scudcloud.png.real /opt/scudcloud/resources/scudcloud.png;sudo cp ~/Downloads/scudcloud.png /opt/scudcloud/resources/;sudo chmod +r /opt/scudcloud/resources/scudcloud.png
@anistark
anistark / git-tricks.md
Last active June 22, 2017 13:19
Git Tips and Tricks

Git Tips and Tricks

Collection of most used git commands

Everyday Git in twenty commands or so

git help everyday

Overwrite pull

@anistark
anistark / objectOrientedProgramming.md
Created October 26, 2015 08:44
What is Object Oriented Programming?

In an excerpt from a 1994 Rolling Stone interview, Jobs explains what object-oriented programming is.

Jeff Goodell: Would you explain, in simple terms, exactly what object-oriented software is?

Steve Jobs: Objects are like people. They’re living, breathing things that have knowledge inside them about how to do things and have memory inside them so they can remember things. And rather than interacting with them at a very low level, you interact with them at a very high level of abstraction, like we’re doing right here. Here’s an example: If I’m your laundry object, you can give me your dirty clothes and send me a message that says, “Can you get my clothes laundered, please.” I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your clean clothes and say,

@anistark
anistark / .bashrc
Last active January 20, 2025 20:35
Tmux Conf
# Tmux Config
tm() { tmux new -s "$1" ;}
ta() { tmux attach -t "$1"; }
tl() { tmux list-sessions; }
tn() { tmux new-window; }
@anistark
anistark / sublimeText.md
Last active February 19, 2016 07:57
Setup Sublime Text

Install via the Package Manager(apt-get):

Simply add to your packages:

For Sublime-Text-2:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
@anistark
anistark / nodeErrors.md
Created October 14, 2015 07:43
Common Node Errors

watch ENOSPC error

cause :

The system has a limit to how many files can be watched by a user. You can run out of watches pretty quickly if you have Grunt running with other programs like Dropbox. This command increases the maximum amount of watches a user can have.

Solution :