Skip to content

Instantly share code, notes, and snippets.

View bih's full-sized avatar
😄

Bilawal Hameed bih

😄
View GitHub Profile
@bih
bih / 960Converter.php
Created March 2, 2012 23:24
Scale up 960.gs files to whatever size you want!
<?php
/* This amazingly cool piece of code converts your 960.gs file into whatever you want */
/* Simply enter your new size in pixels that you wish to scale it up to and it will magically do it! */
function scale_960_gs($new_size = 960) {
$multiplier = abs($new_size / 960);
$i = explode(PHP_EOL, file_get_contents('http://960.gs/css/960.css'));
$a = 0;
foreach($i as $line=>$r) {
$m = array(
@bih
bih / london_cities.json
Created June 11, 2012 15:38
Here's a JSON file of all the inner cities within London. I compiled it when using it for a project.
["Abbey Wood","Acton","Aldwych","Archway","Barking","Barkingside","Barnes","Battersea","Bayswater","Beckenham","Beckton","Belgravia","Belvedere","Bermondsey","Bethnal Green","Biggin Hill","Blackfen","Blackheath","Bloomsbury","Bounds Green","Bow","Brixton","Brockley","Bromley","Brompton","Burnt Oak","Camberwell","Camden","Carshalton Beeches","Catford","Central London","Chelsea","Chingford","Chislehurst","Chiswick","Clapham","Cockfosters","Colindale","Colliers Wood","Cricklewood","Crouch End","Croydon","Crystal Palace","Deptford","Docklands","Ealing","East Dulwich","Edmonton","Elephant & Castle","Eltham","Erith","Euston","Finchley","Finsbury Park","Forest Hill","Fulham","Golders Green","Greenwich","Hackney","Hammersmith","Hampstead","Harlesden","Harold Hill","Harringay","Heathrow Airport","Hendon","Herne Hill","Heston","Highbury","Highgate","Holloway","Honor Oak Park","Hook","Hornchurch","Hornsey","Ickenham","Islington","Kennington","Kensal Rise","Kensington","Kentish Town","Kidbrooke","Kilburn","Lee","Lewisham
@bih
bih / Cheddar-loader.html
Created July 28, 2012 19:00
A simple gist of a Cheddar-logo HTML/CSS/JS logo loader effect. Boredom was a big part of this gist fruition. It is a bit 'hacky' like, so I wouldn't recommend it in production.
<!doctype html>
<head>
<title>Cheddar Loader</title>
<!-- Produced by @bilawalhameed -->
<!-- tha css. kthxbai. -->
<style type="text/css">
#cheddar-loading {
position: relative;
width: 539px;
@bih
bih / Bilawal-Preloader.html
Created July 30, 2012 00:09
Bilaw.al Preloader
<!doctype html>
<head>
<title>Bilaw.al Loader</title>
<!-- Produced by @bilawalhameed -->
<!-- tha css. kthxbai. -->
<style type="text/css">
#bilawal-loading {
position: relative;
width: 112px;
(function($){
function dragEnter(e) {
$(e.target).addClass("dragOver");
e.stopPropagation();
e.preventDefault();
return false;
};
function dragOver(e) {
e.originalEvent.dataTransfer.dropEffect = "copy";
@bih
bih / atms.json
Created March 23, 2013 12:59
ATM's in Manchester (accurate as of 23rd March 2013)
[{"name":"Atherton","address":["116-118 Market Street","Manchester","Lancashire","M46 0NS"],"address_single":"116-118 Market Street, Manchester, Lancashire, M46 0NS","lng":53.523286,"lat":-2.495392},{"name":"Barnes Green","address":["Lee Road","Manchester","Lancashire","M9 4DL"],"address_single":"Lee Road, Manchester, Lancashire, M9 4DL","lng":53.512915,"lat":-2.213129},{"name":"Burnage Lane","address":["89 Burnage Lane","Manchester","Lancashire","M19 2WN"],"address_single":"89 Burnage Lane, Manchester, Lancashire, M19 2WN","lng":53.436671,"lat":-2.199936},{"name":"Cheetham Hill","address":["6 King Edward Buildings","Manchester","Greater Manchester","M7 4QJ"],"address_single":"6 King Edward Buildings, Manchester, Greater Manchester, M7 4QJ","lng":53.513534,"lat":-2.246564},{"name":"Chorlton-Cum-Hardy","address":["543 Wilbraham Road","Manchester","Lancashire","M21 9PP"],"address_single":"543 Wilbraham Road, Manchester, Lancashire, M21 9PP","lng":53.442192,"lat":-2.275356},{"name":"Crofts Bank","address":["12 L
@bih
bih / gtlds.json
Created March 23, 2013 13:04
New gTLD's as json
["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACER","ACO","ACTIVE","ACTOR","ADAC","ADS","ADULT","AEG","AETNA","AFAMILYCOMPANY","AFL","AFRICA","AFRICAMAGIC","AGAKHAN","AGENCY","AIG","AIGO","AIRBUS","AIRFORCE","AIRTEL","AKDN","ALCON","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLFINANZBERATER","ALLFINANZBERATUNG","ALLSTATE","ALLY","ALSACE","ALSTOM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMP","AMSTERDAM","ANALYTICS","AND","ANDROID","ANQUAN","ANSONS","ANTHEM","ANTIVIRUS","ANZ","AOL","APARTMENTS","APP","APPLE","AQUARELLE","AQUITAINE","ARAB","ARAMCO","ARCHI","ARCHITECT","ARE","ARMY","ART","ARTE","ASDA","ASSOCIATES","ASTRIUM","ATHLETA","ATTORNEY","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOINSURANCE","AUTOS","AVERY","AVIANCA","AWS","AXA","AXIS","AZURE","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BANQUE","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","
@bih
bih / getMonthName.extend.js
Created October 21, 2013 15:12
Simple function in JavaScript to getMonthName() :-)
Date.prototype.getMonthName = function(){
return ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"][this.getMonth()];
};
@bih
bih / .bash_profile
Last active December 28, 2015 11:19
function r() {
# Use dot notation for file structure
# "app.assets.stylesheets" == "app/assets/stylesheets"
REPLACE="/"
INPUT="."$1
INPUT=${INPUT//./$REPLACE}
# No longer need to prepend with /
REPLACE="/"
INPUT=${INPUT//\//$REPLACE}
@bih
bih / apple-university-stores.json
Last active November 19, 2023 22:36
List of Apple's UK university education stores w/ web addresses
[{"region":"East Midlands","university":"De Montfort University","url":"http://store.apple.com/uk_edu_5000657"},{"region":"East Midlands","university":"Derby University","url":"http://store.apple.com/uk_edu_5000659"},{"region":"East Midlands","university":"Jisc Collections and Janet Limited","url":"http://store.apple.com/uk_edu_5004321"},{"region":"East Midlands","university":"Leicester University","url":"http://store.apple.com/uk_edu_5000710"},{"region":"East Midlands","university":"Lincoln University","url":"http://store.apple.com/uk_edu_5000712"},{"region":"East Midlands","university":"Loughborough College","url":"http://store.apple.com/uk_edu_5000723"},{"region":"East Midlands","university":"Loughborough University","url":"http://store.apple.com/uk_edu_5002639"},{"region":"East Midlands","university":"Nottingham Trent University","url":"http://store.apple.com/uk_edu_5000747"},{"region":"East Midlands","university":"Nottingham University","url":"http://store.apple.com/uk_edu_5000748"},{"region":"East Midla