Skip to content

Instantly share code, notes, and snippets.

View userimack's full-sized avatar

Mahendra Yadav userimack

View GitHub Profile
@userimack
userimack / settings_test_snippet.py
Created January 11, 2016 18:44 — forked from NotSqrt/settings_test_snippet.py
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@userimack
userimack / The Technical Interview Cheat Sheet.md
Created February 19, 2016 02: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.
@userimack
userimack / Reset-DS1307
Created July 12, 2016 12:45 — forked from buildcircuit/Reset-DS1307
Reset DS1307 real time clock
//Arduino 1.0+ Only
//Arduino 1.0+ Only
#include "Wire.h"
#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527
void setup(){
Wire.begin();
@userimack
userimack / bashrc
Last active December 22, 2016 09:28
bashrc_fedora_modified
# .bashrc
xrandr --output VGA-1-2 --off
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
@userimack
userimack / vimrc
Last active December 22, 2016 09:25
My vimrc
set nocompatible
set et
set ai
set sw=4
set ts=8
set si
set nu
set is
set ic
set sm
@userimack
userimack / blinking.exs
Last active December 9, 2016 07:23
An elixir program to remind every minute to blink. Feel free to recommend modification.
defmodule Blink do
def blink() do
for i <- 1..45 do
IO.puts "Run time #{i}"
# {_,{_, m, _}} = :os.timestamp |> :calendar.now_to_datetime # Using it to run every minute
System.cmd("notify-send",["TODO","Blink"])
Process.sleep(60000) # or we can use ":timer.sleep(60000)"
end
blink() # Calling itself
@userimack
userimack / bashrc_ubuntu
Last active December 22, 2016 09:33
Bashrc in ubuntu unmodified
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@userimack
userimack / learning_resources.md
Created December 22, 2016 13:01 — forked from nathansmith/web-design-development-learning-resources.md
Resources for learning web design & front-end development
#-*-coding:utf-8-*-
from itertools import permutations as pmt
import argparse
import math
import re
class combrider(object):
def __init__(self, *args, **kwargs):
self.lists = args