Skip to content

Instantly share code, notes, and snippets.

View billmei's full-sized avatar
☑️
Verified Profile

Bill Mei billmei

☑️
Verified Profile
View GitHub Profile
@billmei
billmei / breakpoints.css
Created August 23, 2014 16:04
Bootstrap 3 default breakpoints and media queries
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
@billmei
billmei / fluid_width.css
Created August 23, 2014 15:59
Fluid-width CSS video that preserves aspect ratio
<div class="videoContainer">
<iframe src="http://www.example.com/video/embed/link" frameborder="0" allowfullscreen></iframe>
</div>
@billmei
billmei / xy_coords.sublime-snippet
Last active August 29, 2015 14:03
Wrap (x, y) coordinates with punctuation to make them more readable
<snippet>
<content><![CDATA[
"(x, y) == (" + ${1:x_coord} + ", " + ${2:y_coord} + ")"
]]></content>
<tabTrigger>xy</tabTrigger>
</snippet>
@billmei
billmei / accordion.css
Last active August 29, 2015 14:02
Simple jQuery accordions
.accordion {
display: block;
width: 100%;
list-style: none;
cursor: pointer;
}
.accordion, .accordion * {
margin: 0;
padding: 0;
}
@billmei
billmei / filterMeetupEvents.js
Last active August 29, 2015 14:01
Filters event listings on Meetup.com to show only the popular ones that have attendees greater than the specified number
// Filters event listings on Meetup.com to show only the popular ones that have attendees greater than the specified number
function filterMeetupEvents(numberOfAttendees) {
var $attendeeCount = $('.attendee-count');
var regexp = /([0-9]{1,3})/;
$.each($attendeeCount, function(index, val) {
if (($(this).html()+'').match(regexp)[0] < numberOfAttendees) {
$(this).parent().parent().parent().remove();
}
});
}
@billmei
billmei / change-timezone.sh
Created May 9, 2014 19:03
Change the timezone on Linux
sudo time-admin
@billmei
billmei / change-brightness.sh
Created May 3, 2014 01:44
Dirty workaround to adjust the system brightness for Linux Mint on Toshiba laptops when the Fn buttons don't work
echo 300 | sudo tee /sys/class/backlight/intel_backlight/brightness > /dev/null
@billmei
billmei / jsprint.sublime-snippet
Created March 11, 2014 04:31
Snippet to use 'print' as a shortcut for 'console.log();' in JavaScript for Sublime Text
<snippet>
<content><![CDATA[
console.log($1);
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>print</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
<description>console.log();</description>
</snippet>
@billmei
billmei / remove_blur.js
Created March 9, 2014 01:30
Removes the DRM blur on Scribd when entered into the JavaScript console in your browser
$('.text_layer').removeAttr('style');
@billmei
billmei / countries.html
Last active November 19, 2021 17:33
Option select list of countries and country codes
<select>
<option value="AF">Afghanistan</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>