Skip to content

Instantly share code, notes, and snippets.

@roine
roine / config.js
Created July 23, 2013 07:46
meteor accounts config
Accounts.loginServiceConfiguration.remove({service: "github"});
Accounts.loginServiceConfiguration.remove({service: "facebook"});
Accounts.loginServiceConfiguration.remove({service: "twitter"});
Accounts.loginServiceConfiguration.remove({service: "linkedin"});
Accounts.loginServiceConfiguration.insert({
service: "github",
clientId: "ID",
secret: "SECRET"
});
@roine
roine / app.scss
Created July 4, 2013 04:30
scss loading order
@import "style_bootstrap"; // twitter bootstrap or zurb foundation
@import "settings"; // contains the variables
@import "helpers" // contains all the reusable classes
@import "styles" // contains the general style could be split into small files (ie: 'header', 'content', 'column_left', 'footer', 'page1')
@import "tweaks" // your shame
@roine
roine / main.js
Created July 3, 2013 06:01
Simply hide label if placeholder is supported
var hasPlaceholder = function(){
return 'placeholder' in document.createElement('input');
}
if(hasPlaceholder()){
$('form label').hide();
}
@roine
roine / index.html
Last active December 18, 2015 22:39
marquee style without gap
<ul class="slideContainer" id="money_start">
<li class="slideItem" >
EUR
</li>
<li class="slideItem">
USD
</li>
<li class="slideItem">
JPY
</li>
@roine
roine / colors.scss
Last active December 18, 2015 06:59
cool colors
// http://api.colourco.de/export/png/%23cdb6e7%2C%23bedae9%2C%23c0df9f%2C%23ddca98%2C%23e8baba
purple
#cdb6e7
rgb(205, 182, 231)
hsl(268, 50%, 81%)
hcl(309, 28%, 77%)
lab(77, 17, -21)
blue
@roine
roine / isArray.js
Created May 31, 2013 09:59
find out if array
function is_array(variable){
return Object.prototype.toString.call( variable ) === '[object Array]'
}
@roine
roine / find_and_replace_by.php
Last active December 17, 2015 12:38
Basic find and replace in all the tables from a secific database. I use this script for my wordpress deployment.
<?php
/*
* find_and_replace_by takes 4 optional arguments
* first is the host
* second is db username
* third is db password
* fourth is database name
* ie: $ find_and_replace_by.php root password drupal
* or with two arguments:
@roine
roine / helper.js
Last active December 17, 2015 10:49
web app helper
var helper = window.helper = {
/*
Boolean
*/
isiPad: navigator.userAgent.match(/iPad/i) != null,
isRetina: window.devicePixelRatio && window.devicePixelRatio > 1,
isOnline: navigator.onLine,
isWebAppMode: window.navigator.standalone || false,
landscape: function(){ return Math.abs(helper.orientation) === 90; },
portrait: function(){ return !helper.landscape() },
@roine
roine / dabblet.css
Created May 10, 2013 08:59
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@roine
roine / .gitignore
Created April 26, 2013 08:06
How I work with wordpress in production and development env
wp-config-locale.php