Skip to content

Instantly share code, notes, and snippets.

@akaak
akaak / strip-columns
Created February 21, 2014 14:33
Strip or cut columns from a data file
# remove columns from a file
#http://stackoverflow.com/questions/13446255/how-to-remove-the-first-two-columns-in-a-file-using-shell-awk-sed-whatever
cut -d " " -f 3- input_filename > output_filename

Keybase proof

I hereby claim:

  • I am akaak on github.
  • I am akaak (https://keybase.io/akaak) on keybase.
  • I have a public key whose fingerprint is 97E3 CE88 164F CECD 20A1 819E 8F62 05B3 66B6 B265

To claim this, I am signing this object:

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="http://www.skulpt.org/static/skulpt.min.js" type="text/javascript"></script>
<script src="http://www.skulpt.org/static/skulpt-stdlib.js" type="text/javascript"></script>
</head>
<body>
@akaak
akaak / md-gist.md
Last active August 29, 2015 14:26
md gist

Title One

Paragraph

Title Two

Paragraph of text.

Link to

@akaak
akaak / unrar.sh
Created October 29, 2015 18:38
Go through far files in a directory and unrar them.
# Go through all files with extension .rar.
# create a folder with DIR_FileName
# Unrar each rar file and keep them in the respective directory
# install unrar using "brew" on mac
#
for filename in *.rar;
do echo "put ${filename}";
mkdir RAR_${filename}
unrar ${filename} RAR_${filename}
done
@akaak
akaak / mail-test.py
Last active January 30, 2016 21:05
#
# code snippet from python docs: https://docs.python.org/2/library/email-examples.html
#
# Prerequisites
# - install MailCatcher <http://mailcatcher.me>
# - set me and you email addresses
# - create a mail-file.txt with some text content
#
# Import smtplib for the actual sending function
@akaak
akaak / app.py
Created February 11, 2016 03:11
Flask application with a Form, Model, Database (SQLAlchemy for ORM). Uses modules structure rather than a package structure.
from flask import Flask, url_for
from flask import request, render_template, flash, redirect
from forms import BizForm, AddBiz
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.security import Security, utils
from contextlib import closing
from datetime import date
import forms
@akaak
akaak / pip-scripts.md
Created November 19, 2016 20:23
PIP related

if an install using pip is giving errors/exceptions then

$ sudo pip install PACKAGE_NAME --ignore-installed six should work

@akaak
akaak / aws-js-sdk-sample.html
Last active November 20, 2016 01:13
AWS Javascript SDK Sample
<!---
Sample.html file used with the AWS example located at: https://aws.amazon.com/developers/getting-started/browser/
Working sample with facebook app integration.
--->
<!DOCTYPE html>
<html>
<head>
@akaak
akaak / simple-page.html
Created December 4, 2016 01:25
Simple HTML page with bootstrap css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">