Skip to content

Instantly share code, notes, and snippets.

<?php
date_default_timezone_set('Asia/Jakarta');
/*
*---------------------------------------------------------------
* APPLICATION ENVIRONMENT
*---------------------------------------------------------------
*
* You can load different configurations depending on your
* current environment. Setting the environment also influences
@ahmadmilzam
ahmadmilzam / SCSS.md
Created August 14, 2014 15:58 — forked from jareware/SCSS.md

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

├── mixins/
│ │── _vendor.scss
│ │── _position.scss
│ └── _background-image.scss
├── modules/
│ │── _normalize.scss
│ │── _clearfix.scss
│ │── _variables.scss
│ │── _app.scss
| │── _buttons.scss
google.maps.event.addDomListener(window, 'resize', function() {
var center = map.getCenter()
google.maps.event.trigger(map, "resize")
map.setCenter(center)
})
function scrollTo(Y, duration, easingFunction, callback) {
var start = Date.now(),
elem = document.documentElement.scrollTop?document.documentElement:document.body,
from = elem.scrollTop;
if(from === Y) {
callback();
return; /* Prevent scrolling to the Y point if already there */
}
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
function scrollTo(Y, duration, easingFunction, callback) {
var start = Date.now(),
elem = document.documentElement.scrollTop?document.documentElement:document.body,
from = elem.scrollTop;
if(from === Y) {
callback();
return; /* Prevent scrolling to the Y point if already there */
}
@ahmadmilzam
ahmadmilzam / mapper.js
Created December 9, 2014 11:04
Usefull wrapper module for Google Map API V3
/**
* Usefull wrapper module for Google Map API V3
* @param {object} win
* @param {object} google
* @return {object}
*
* Author: Ahmad Milzam (http://ahmadmilzam.com)
*/
var Mapper = (function(win, google){
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;