Skip to content

Instantly share code, notes, and snippets.

View valleyjo's full-sized avatar

Alex Vallejo valleyjo

View GitHub Profile
@valleyjo
valleyjo / alu_a_forwarding_select.vhdl
Last active August 29, 2015 14:11
Remove not section from ForwardA selection
-- ALU Input A
-- 11 <= Load Hazard
-- 10 <= MEM hazard
-- 01 <= WB hazard
-- 00 <= no hazard
ForwardA <= "11" when mem_memread = '1' and (INST_RS_ex = writeaddr_mem) else
"10" when (RegWrite_Mem = '1' and (WriteAddr_Mem /= "00000") and (WriteAddr_Mem = INST_RS_Ex)) else
"01" when (RegWrite = '1' and WriteAddr /= "00000" and WriteAddr = INST_RS_Ex) else
"00";
@valleyjo
valleyjo / azure_upload.py
Last active July 27, 2022 08:55
Upload files to azure blob store using python
# Upload a file to azure blob store using python
#
# Usage: python2.7 azure_upload.py <account_details_file.txt> <container_name> <file_name>
#
# The blob name is the same as the file name
# Running:
# python2.7 azure_info.txt js test_file.js
# Creates a blob at address:
# http://<account_name>.blob.core.windows.net/js/test_file.js
#
@valleyjo
valleyjo / ex-pack.sh
Created March 25, 2014 19:24
Find and display the 5 largest items in your git repository's pack
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]