Skip to content

Instantly share code, notes, and snippets.

Writing CSS

Tommy Hodgins tomhodgins

Writing CSS
Block or report user

Report or block tomhodgins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tomhodgins / Component.js
Created Jan 4, 2017 — forked from bloodyowl/Component.js
Component library in less than 140 bytes
View Component.js
b=0;$=x=>(p,i="_"+b++,u=($[i]=q=>eval(i).innerHTML=x(p,$[q],u),z=>($[++b]=z,`$.${i}(${b})`)))=>`<c id=${i}>${x(p,[]._,u)}</c>`
tomhodgins / windowResizeHeight.js
Created Dec 13, 2016 — forked from JKirchartz/windowResizeHeight.js
If I have to write bad code to get the "right" design, so be it, but at least I can keep it D.R.Y. -- This snippet listens to window sizing commands, internally the sameHeight functions take a container class and a child's class, find the tallest child, then makes all that containers children the same height -- this is only for when CSS's `flexb…
View windowResizeHeight.js
function sameHeight(container, child) {
var tallest = 0;
$(child, this).each(function(){
if($(this).height() > tallest) {
tallest = $(this).height();
$(child, this).height(tallest);
tomhodgins /
Created Jul 14, 2016 — forked from xem/
Maths & trigonometry cheat sheet for 2D games


  • o = [xo = 0, yo = 0] is the origin
  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

View notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/solarized_dark");e.getSession().setMode("ace/mode/html");</script>
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
View bootstrap.flatten.css
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
You can’t perform that action at this time.