Skip to content

Instantly share code, notes, and snippets.

View magician11's full-sized avatar

A magician11

  • Golightly+
  • New Zealand
View GitHub Profile
@magician11
magician11 / fixed_header.css
Last active August 29, 2015 13:55
Fixed Header
/* FIXED HEADER */
#header, header.site-header {
position: fixed;
width: 100%;
z-index: 999;
}
/* Padding will need to be added. It may not be here. */
#inner, div.site-container div.site-inner {
@magician11
magician11 / ewp_tables.css
Created February 21, 2014 09:27
EfficientWP tables
.ewp_table {
width: 100%;
background-color: #ecf0f1; /* Flat UI Color: CLOUDS */
border-spacing: 0px;
}
.ewp_table, .ewp_table td, .ewp_table th {
border: 1px solid #34495e; /* Flat UI Color: WET ASPHALT */
}
@magician11
magician11 / ewp_gravityforms.css
Last active August 29, 2015 13:56
EfficientWP styling for Gravity Forms
/* GRAVITY FORMS */
.ewp_contact_form input[type="submit"] {
background-color: #333;
color: #fff !important;
border: none;
border-radius: 3px;
padding: 16px 24px !important;
text-transform: uppercase;
cursor: pointer;
@magician11
magician11 / ewp_subnav_alignright.css
Created March 8, 2014 06:48
Align the subnav in Dynamik to the right
/* align the subnav to the right */
#menu-secondary-navigation {
text-align: right;
}
#menu-secondary-navigation li {
display: inline-block;
float: none;
}
@magician11
magician11 / ewp_fullwidth.css
Created March 14, 2014 15:04
Enable full width on Dynamik
/* to enable full width: */
body.full-width-background div.site-container,
body.full-width-background div#inner,
body.full-width-background div#inner div.wrap,
body.full-width-background div#content-sidebar-wrap,
body.full-width-background div.content-sidebar-wrap,
body.full-width-background div#content,
body.full-width-background main.content,
body.full-width-background div.site-inner,
body.full-width-background div.site-inner article,
@magician11
magician11 / bitcoin.js
Created June 27, 2014 03:37
Node.js code to access bitcoin.co.id trading api
var request = require('request');
var qs = require('querystring');
var crypto = require('crypto');
var secretKey = "my secret key";
var apiKey = 'public API key';
var postData = {
method: 'getInfo',
nonce: new Date().getTime()
@magician11
magician11 / deepEqual.js
Last active August 29, 2015 14:18
An implementation of deep comparison between objects
function deepEqual(val1, val2) {
if(val1 === val2) {
console.log(val1 + ' is the same as ' + val2);
return true;
} else if(typeof val1 === 'object' && typeof val2 === 'object'
&& val1 !== null && val2 !== null) {
var val1Keys = Object.keys(val1);
var val2Keys = Object.keys(val2);
@magician11
magician11 / vendor-prefixes.scss
Created May 16, 2015 19:48
Mixin for vendor prefixes using SCSS
/* Usage:
@include vendor-prefixes(transform, 'scale(0, 0)');
*/
@mixin vendor-prefixes($property, $values) {
-webkit-#{$property}: #{$values};
-moz-#{$property}: #{$values};
-ms-#{$property}: #{$values};
@magician11
magician11 / keyframes.scss
Created May 16, 2015 20:33
Keyframes for all vendor prefixes using SCSS
/* Usage
@include keyframes(my-transition) {
from {opacity: 0;}
to {opacity: 1;}
}
*/
@mixin keyframes($animation-name) {
@-webkit-keyframes #{$animation-name} {
@magician11
magician11 / flyin.scss
Created May 16, 2015 21:30
CSS3 flyIn demo
.profile-pic-transition.ng-hide-remove.ng-hide-remove-active {
@include vendor-prefixes(animation, 'flyIn 3s');
}
@include keyframes(flyIn) {
0% {
opacity: 0;
@include vendor-prefixes(transform, 'scale(0, 0)');
}