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 / font-weight.css
Last active January 9, 2018 18:21
Standard Font Weights
p {
font-weight: 100; /* Thin (or "Hairline") */
font-weight: 200; /* Extra Light (or "Ultra Light") */
font-weight: 300; /* Light */
font-weight: 400; /* Normal (or "Regular" or "Book") */
font-weight: 500; /* Medium */
font-weight: 600; /* Semi Bold (or "Demi Bold") */
font-weight: 700; /* Bold */
font-weight: 800; /* Extra Bold (or "Ultra Bold") */
font-weight: 900; /* Black (or "Heavy") */
@billmei
billmei / match_first_blank.xls
Created March 2, 2014 06:06
Excel formula to match the first blank cell in a list array
MATCH(TRUE,INDEX(ISBLANK(A1:A42),0,0),0))
@billmei
billmei / sum_every_other_cell.xls
Created March 2, 2014 06:14
Excel formula to sum every nth cell in an array
SUMPRODUCT((MOD(ROW($A$1:$A$42),Length)-MOD(ROW(A5),Length)=0)*($A$1:$A$42))
A5 is the cell to start counting from.
@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>
@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 / 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 / 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 / change-timezone.sh
Created May 9, 2014 19:03
Change the timezone on Linux
sudo time-admin
@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 / 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;
}