Skip to content

Instantly share code, notes, and snippets.

View alycda's full-sized avatar

Alyssa Evans alycda

View GitHub Profile
@alycda
alycda / Media Queries
Last active October 13, 2015 14:58
CSS: media queries (visible output) #sublime
// MEDIA QUERIES
// ------------------
body:before {
background: #ffc;
/* width: 96%; */
display:block;
position: absolute;
z-index:1000;
/* padding: 1em 2%; */
@alycda
alycda / web presets
Last active December 16, 2015 10:49
Adobe Photoshop: Web Presets Macintosh HD > Applications > Adobe Photoshop CSX.x > Locales > EN_US > Support Files > Default New Doc Sizes.txt
; Interactive Marketing Unit (IMU) ad formats, defined by the
; Interactive Advertising Bureau, <http://www.iab.net/>
"Medium Rectangle, 300 x 250" 300 250 pixels screen dpi RGB 8 1.0
"Rectangle, 180 x 50" 180 50 pixels screen dpi RGB 8 1.0
"Leaderboard, 728 x 90" 728 90 pixels screen dpi RGB 8 1.0
"Wide Skyscraper, 160 x 600" 160 600 pixels screen dpi RGB 8 1.0
"Full Banner, 468x60" 468 60 pixels screen dpi RGB 8 1.0
"Square, 250x250" 250 250 pixels screen dpi RGB 8 1.0
"Square, 420x420" 420 420 pixels screen dpi RGB 8 1.0
@alycda
alycda / github.css
Created May 1, 2013 17:20 — forked from theconektd/github.css
CSS: Github. #sublime
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@alycda
alycda / retina image replacement
Last active December 16, 2015 21:29
JavaScript: retina image replacement. #sublime
// http://css3.bradshawenterprises.com/blog/retina-image-replacement-for-new-ipad/
// Set pixelRatio to 1 if the browser doesn't offer it up.
var pixelRatio = !!window.devicePixelRatio ? window.devicePixelRatio : 1;
// Rather than waiting for document ready, where the images
// have already loaded, we'll jump in as soon as possible.
$(window).on("load", function() {
if (pixelRatio > 1) {
$('img').each(function() {
@alycda
alycda / viewport no zoom
Last active December 19, 2015 15:39
HTML: viewport (without mobile zoom) #sublime
<!--maximum-scale=1 disallows zooming on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@alycda
alycda / viewport with zoom
Last active December 19, 2015 15:38
HTML: viewport (with mobile zoom) #sublime
<!--remove maximum-scale=1 to allow zooming on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1">
@alycda
alycda / server init
Created July 11, 2013 18:06
Node.JS: initialize server. #sublime
var http = require('http');
var url = require('url');
var route = function(request, response){
var path = url.parse(request.url).pathname;
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World.\n');
};
http.createServer(route).listen(8000);
@alycda
alycda / Command Line usage of Less
Last active December 19, 2015 18:18
LESS: Command Line Usage #sublime
@goldenRatio: 1.6;
@media screen and (min-width: 1025px) { @baseFontSize: 4.7px; @baseHeight: 7.5px; .font-sizes(@baseFontSize; @goldenRatio); .font-line-height(@baseHeight, @goldenRatio); }
@media screen and (max-width: 1024px) and (min-width: 701px) { @baseFontSize: 4.1px; @baseHeight: 6px; .font-sizes(@baseFontSize; @goldenRatio); .font-line-height(@baseHeight, @goldenRatio); }
@media screen and (max-width: 700px){ @baseFontSize: 3.4px; @baseHeight: 4.1px; .font-sizes(@baseFontSize; @goldenRatio); .font-line-height(@baseHeight, @goldenRatio); }
.font-sizes(@baseFontSize; @goldenRatio) { h1 { font-size: (@baseFontSize * (pow(@goldenRatio, 6))); } h2 { font-size: (@baseFontSize * (pow(@goldenRatio, 5))); } h3 { font-size: (@baseFontSize * (pow(@goldenRatio, 4))); } h4 { font-size: (@baseFontSize * (pow(@goldenRatio, 3))); } h5 { font-size: (@baseFontSize * (pow(@goldenRatio, 2))); } h6 { font-size: (@baseFontSize * (pow(@goldenRatio, 1))); } p { font-size: (@baseFontSize * (pow(@goldenRatio, 2))); } li {
// put this in head.
<script type='text/javascript'>window.q=[];window.$=function(f){q.push(f)}</script>
// anywhere throughout the body.
<script>
$(function(){
// call jQuery before it's loaded.
});
</script>
@alycda
alycda / SassMeister-input-HTML.html
Created June 9, 2014 23:14
Generated by SassMeister.com.
<style>
.boxes, .timeline, .charachter, .swipe-container, .community, .news, .article, .preorder, .error, .sticky {
margin-top: 10%;
}
</style>
<body class="container">
<header class="main-header">
<div class="wrapper">
<!-- Animate the logo! http://snapsvg.io/docs/-->