Skip to content

Instantly share code, notes, and snippets.

View bih's full-sized avatar
😄

Bilawal Hameed bih

😄
View GitHub Profile
protocol Calendar {
typealias Unit: BidirectionalIndexType
typealias Era: Unit
typealias Year: Unit
typealias Month: Unit
typealias Week: Unit
typealias Day: Unit
typealias Weekday: Unit
typealias Hour: Unit
struct URL {
var scheme: String?
var user: String?
var password: String?
var host: String?
var port: Int?
var path: String?
var query: String?
var fragment: String?
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 16, 2024 23:05
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.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@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
@pbiggar
pbiggar / gist:3166676
Created July 23, 2012 22:35
Sample circle.yml file
########################
# Customize the test machine
########################
machine:
# Set the timezeone - any value from /usr/share/zoneinfo/ is valid here
timezone:
America/Los_Angeles
# Version of ruby to use
@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(
@mathias
mathias / buttons.coffee
Created January 30, 2012 15:31
Haml + Coffeescript Tweet button and Like button
((d, s, id) ->
js = undefined
fjs = d.getElementsByTagName(s)[0]
return if d.getElementById(id)
js = d.createElement(s)
js.id = id
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1"
fjs.parentNode.insertBefore js, fjs
) document, "script", "facebook-jssdk"
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@yuya-takeyama
yuya-takeyama / binarytree.rb
Created February 5, 2011 14:32
Binary Tree implemented in Ruby.
module BinaryTree
class Node
attr_reader :word, :count, :left, :right
include Enumerable
def initialize(word)
@word, @count = word, 1
end
@njonsson
njonsson / The difference between the junior and senior Rails developer
Created May 6, 2009 03:31
The difference between the junior and senior Rails developer — an extract of the discussion forum at the Rubyists LinkedIn group
Someone recently asked the following question in the discussion forum of the Rubyists LinkedIn group: What separates a junior Rails developer from a senior one?
My response follows. Join us at http://www.linkedin.com/groups?gid=120725 to weigh in on this and other topics of interest to Rubyists. As of today there are almost 1,200 members, including numerous movers and shakers in the Ruby and Rails communities.
“Distinguishing between junior and senior people in the Rails world is not so different from making the distinction in other web development environments.
“Junior Rails people have not dealt with scaling issues to the degree that senior people have. Getting a public-facing Rails application to perform under significant stress is more challenging than doing the same with other building materials such as PHP. Senior people know how to performance-test Rails applications, where to look for bottlenecks, and how to eliminate them one after another until performance is acceptable in real conditions. The Ra