Skip to content

Instantly share code, notes, and snippets.

View shrayasr's full-sized avatar

Shrayas Rajagopal shrayasr

View GitHub Profile
@shrayasr
shrayasr / hack.sh
Created March 31, 2012 14:49 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
$ cd ~/source
$ ftp http://developer.kde.org/~wheeler/files/src/taglib-1.7.1.tar.gz
$ tar -zxvf taglib-1.7.1.tar.gz
$ rm -r taglib-1.7.1.tar.gz
$ cd taglib-1.7.1
$ cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 \
-DCMAKE_OSX_ARCHITECTURES="i386;x86_64" \
-DENABLE_STATIC=ON \
@shrayasr
shrayasr / _NOTE.md
Last active July 15, 2022 05:35
Installing Wget on MAC OSX

Note

I don't maintain this now, sorry

@shrayasr
shrayasr / OLD_OLD_OLD_install_tmux_osx_no_brew.html
Last active July 17, 2023 14:45
[OBSOLETE] Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz
curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz
# Extract them
tar xzf tmux-1.5.tar.gz
@shrayasr
shrayasr / getting-started-with-flask-login.md
Last active June 30, 2019 15:46
Getting started with Flask-Login

Getting started with Flask-Login

Pre-requisites

  • Flask pip install flask
  • Flask-Login pip install flask-login

Steps

  • Create your user model class: User. This would be a class that stores information about your User. Essentially the user_name, user_id, email, etc.
@shrayasr
shrayasr / update-sidebar-praw.md
Last active August 9, 2020 08:33
Updating sidebar content with PRAW

Updating reddit sidebar content with PRAW

PRAW is the AWESOME Reddit API Wrapper written in Python.

Download PRAW

pip install praw

Import PRAW

@shrayasr
shrayasr / win-dev-env.md
Last active September 18, 2018 15:45
Setting up my windows dev environment

Setting up my development environment on windows

So, I recently switched jobs and moved from SAP to Logic Soft Pvt. Ltd. We here @ Logic Soft build applications on the windows platform. Which makes it absolutely necessary for me to have a windows laptop.

Today, The Dell Inspiron 15 5000 series (5547) that I ordered came in. Really nice piece of hardware. This document entails my journey in setting up a decently functional development environment

@shrayasr
shrayasr / pair-program-tmux.md
Last active March 29, 2022 13:58
Pair programming with Tmux

Pair programming with Tmux

Using the same user

User 1

  1. SSH into the box

     user1@user1-machine$ ssh user@host
    
@shrayasr
shrayasr / titbits.txt
Last active August 29, 2015 14:12
Programming titbits
// C# | Sorted list, and iterating through them
int value = 1;
SortedList<string, int> sl = new SortedList<string, int>();
sl.add("key", value)
foreach(KeyValuePair<string,int> kv in sl)
{
Console.WriteLine(kv.Key + "=>" + kv.Value);
}

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma