Skip to content

Instantly share code, notes, and snippets.

View kra3's full-sized avatar
🤠
I may be slow to respond.

Arun Karunagath kra3

🤠
I may be slow to respond.
View GitHub Profile
@kra3
kra3 / ifconfig_sample.c
Created July 1, 2012 09:30 — forked from copyninja/ifconfig_sample.c
Just for fun - Ip getting and setting
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if_arp.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <features.h>
@kra3
kra3 / internet-share.sh
Created July 1, 2012 09:30 — forked from copyninja/internet-share.sh
Enabling the internet sharing
#!/bin/zsh
# Bring up the wlan0 interface
ifconfig wlan0 up
# Put the interface in Ad-hoc mode
iwconfig wlan0 mode Ad-Hoc
# Set the essid for the access point
iwconfig wlan0 essid copyninja
# Listen for DHCP and DNS on this interface
interface=wlan0
# No dhcp for this interface
no-dhcp-interface=usb0
# Domain name for a subnet
domain=copyninja.info, 192.168.1.0/24
#dhcp range
@kra3
kra3 / app.yaml
Created July 2, 2012 06:47 — forked from darktable/app.yaml
GAE: App.yaml designed for serving a static site on Google App Engine (Python). Copy your static html and files into a folder called "static" next to app.yaml. Contains a bunch of mimetype declarations from html5boilerplate's .htaccess. May not be neces
application: you-app-name-here
version: 1
runtime: python
api_version: 1
default_expiration: "30d"
handlers:
- url: /(.*\.(appcache|manifest))
mime_type: text/cache-manifest
@kra3
kra3 / windows.h__.js
Created November 20, 2012 10:28
windows.h.js INFINITY
var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];
@kra3
kra3 / _readme.md
Created August 5, 2013 13:19 — forked from mislav/_readme.md

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@kra3
kra3 / license.md
Last active December 21, 2015 00:59 — forked from hmarr/gist:1013596
Couple of virtualenvwrapper hooks
@kra3
kra3 / README.md
Created October 13, 2013 12:16 — forked from nikcub/README.md
@kra3
kra3 / The Technical Interview Cheat Sheet.md
Created February 17, 2017 18:57 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.