Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am atneik on github.
  • I am aniket (https://keybase.io/aniket) on keybase.
  • I have a public key ASCv3fwhAtLJogmMZtOMuyThunmzPS06-n6Dv9xUDi17xwo

To claim this, I am signing this object:

POP
http://ninjamock.com/
http://balsamiq.com/
https://www.flinto.com/
proto.ioinvisionapp.com
@atneik
atneik / gist:7987601
Created December 16, 2013 14:18
Toggle Hidden Files service for Automator
STATUS=`defaults read com.apple.finder AppleShowAllFiles`
if [ $STATUS == TRUE ];
then
defaults write com.apple.finder AppleShowAllFiles FALSE
else
@atneik
atneik / gist:7518346
Last active December 28, 2015 14:59
.bash_profile for Mac
# ---------------------------------------------------------------------------
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
# 8. Web Development
@atneik
atneik / gist:6286496
Last active December 21, 2015 09:39
VM start
sudo apt-get install -y git-core
git config --global user.email "atneik@gmail.com"
git config --global user.name "Aniket Handa"
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install -y nodejs
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://npmjs.org/install.sh | sh
@atneik
atneik / atoi.c
Created November 4, 2012 09:27
atoi
#include <stdio.h>
#include <math.h>
#include <limits.h>
int myAtoi ( const char * str ){
int number = 0;
int index = 0;
int length;
int isNeg = 0;
@atneik
atneik / BasicLL.c
Created September 17, 2012 10:08
A basic singly Linked List with addAtEnd(), addAtBeg(), display() and more operations.
#include <stdio.h>
#include <stdlib.h>
struct node{
int val;
struct node *next;
};
int addAtEnd(struct node **h, int x){
@atneik
atneik / image2text.cpp
Created March 21, 2012 02:57
Image processing A1
#include <stdio.h>
#include <stdlib.h>
#include <cv.h>
#include <highgui.h>
#define MAG 12
struct ratio
{
float value;
@atneik
atneik / letter-level.txt
Created March 21, 2012 02:11
Text to Image - letter-grey-level
: 0.000000
.: 15.255068
': 19.999691
,: 26.865257
:: 30.510136
`: 34.516357
": 39.999382
;: 42.120327
_: 44.524059
-: 51.656708