Skip to content

Instantly share code, notes, and snippets.

View roden0's full-sized avatar
🎯
Focusing

Rodrigo Encinas roden0

🎯
Focusing
  • Barcelona
View GitHub Profile
/* SMARTPHONES */
@media only screen and (min-device-width : 320px) and (max-device-width : 480px) {
}
/* PORTRAIT TABLETS & LANDSCAPE PHONES */
@media screen and (min-width: 481px) and (max-width: 640px) {
}
/* TABLETS */
/*
*
* FONTS
* by @dic7 (github: ivanmendoza)
*
*/
#fonts{
.base(@size: 1em){
font:normal @size verdana, helvetica, arial, sans-serif;
}
/*
*
* Icon index
* by @dic7 (github: ivanmendoza)
*
*/
/*
* SPRITE
* url: ../images/icons.png
@roden0
roden0 / .gitignore
Created May 14, 2013 11:14
gitignore
# -- Editores -----------------------------------------
# vim
.*.sw[a-z]
*.un~
Session.vim
.netrwhist
# eclipse
*.pydevproject
.project
@outerWidth: 960px;
@borderWidth: 10px;
@padding: 10px;
#container {
width: @outerWidth - ( @borderWidth + @padding ) * 2;
border: @borderWidth solid #999;
padding: @padding;
}
font: @weight @size e('/') @height "Helvetica Neue", Arial, "Liberation Sans", FreeSans, sans-serif;
function RestServiceJs(newurl) {
this.myurl = newurl;
this.post = function(model, callback) {
$.ajax({
type: 'POST',
url: this.myurl,
data: JSON.stringify(model), // '{"name":"' + model.name + '"}',
dataType: 'text',
processData: false,
@roden0
roden0 / app.js
Last active December 17, 2015 14:59
Sencha Touch Angular Adapter: Todo Sample
angular.service('todoStore', function(jsonp, waitDialog) {
var readUrl = 'https://secure.openkeyval.org/';
var writeUrl = 'https://secure.openkeyval.org/store/?';
function read(key, success) {
waitDialog.show('Please wait');
jsonp('JSON', readUrl + key + '?callback=JSON_CALLBACK', function(status, data) {
success(data);
waitDialog.hide();
}, function(status) {
@roden0
roden0 / serializeObject.js
Created May 24, 2013 14:20
Convert form data to JS object with jQuery. http://www.tobiascohen.com/
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<h2>Create some JSON object that is nested/structured from a form</h2>
<form id="form">
<input id="id" type="text" name="id" placeholder="id..." />