Skip to content

Instantly share code, notes, and snippets.

@gshrikant
gshrikant / grab_pdfs.py
Last active August 27, 2018 02:36 — forked from elssar/grab_pdfs.py
Download all the pdf files linked in a given webpage.
#!/usr/bin/env python
"""
Download all the pdfs linked on a given webpage
Usage -
python grab_pdfs.py url <path/to/directory>
url is required
path is optional. Path needs to be absolute
@gshrikant
gshrikant / structs-3.c
Created March 22, 2017 09:07
Structure Pointers
/*
* structs-3.c
* Use struct pointers without declaring the struct itself!
*/
#include <stdio.h>
int
main(void)
{
@gshrikant
gshrikant / hw.vhd
Created December 1, 2014 16:36
VHDL Course
-- hw.vhd
-- Hello World in VHDL
-- Switch an LED in response to a button
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity LED_Switch is
Port ( switch_0 : in STD_LOGIC;
LED_0 : out STD_LOGIC );
@gshrikant
gshrikant / adc.c
Last active January 4, 2016 09:19
ADC peripheral driver for ATmega328P
/*
* adc.c
*
* Analog-Digital Conversion example
*
* Hardware: ATMega328P at 16 MHz
* Toolchain: avr-gcc v4.3.3
* Editor: Eclipse Kepler (4.0) with GNU Make
* Usage:
* Include and edit settings in adc.h and compile using 'make all'
@gshrikant
gshrikant / uart.c
Last active November 16, 2022 10:19
Routines for asynchronous UART communication on the ATMega328P
/*
* uart.c
*
* Asynchronous UART example tested on ATMega328P (16 MHz)
*
* Toolchain: avr-gcc (4.3.3)
* Editor: Eclipse Kepler (4)
* Usage:
* Perform all settings in uart.h and enable by calling initUART(void)
* Compile:
@gshrikant
gshrikant / lcd.c
Last active January 3, 2016 20:29
HD44780-compatible LCD Driver for LPC2148
/*
* lcd.c
*
* Low-level driver for Hitachi's HD44780 LCD for LPC2148 board
*
* Created on: 20-Jan-2014
* Author: Shrikant Giridhar
*/
#include "lpc214x.h"