Skip to content

Instantly share code, notes, and snippets.

View abelorian's full-sized avatar
🎯
Focusing

Abel O'Rian abelorian

🎯
Focusing
View GitHub Profile
@abelorian
abelorian / youtube.html
Created September 30, 2014 01:50
Responsive youtube
<div class="video-container">
<iframe src="http://www.youtube.com/embed/dFVxGRekRSg" frameborder="0" width="560" height="315"></iframe>
</div>
@abelorian
abelorian / CustomFieldWP.php
Created October 3, 2014 02:47
Custom Fields Wordpress loop
$args = array('post_type' => 'post_alcalde', 'posts_per_page' => 10, 'order' => 'ASC');
$loop = new WP_Query($args);
$slide = '';
while ($loop->have_posts()) : $loop->the_post();
$imagenfull = get_field('imagenalcalde');
$imagen = $imagenfull['url'];
?>
@abelorian
abelorian / ngParseService.js
Last active August 29, 2015 14:07
Parse Service for AngularJS
'use strict'
angular.module('MODULENAME', [])
.service('ParseService', function() {
var appKey = 'YOUR appKey';
var jsKey = 'YOUR jsKey';
@abelorian
abelorian / internetStatus.js
Created November 10, 2014 07:43
Get internet status on cordova
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
});
app.run(function($window, $rootScope) {
$rootScope.online = navigator.onLine;
$window.addEventListener("offline", function () {
$rootScope.$apply(function() {
@abelorian
abelorian / ngLocalStorage.js
Created November 15, 2014 05:01
AngularJS service for HTML5 localStorage
'use strict'
angular.module('app.datosLocalesService', [])
.service('DatosLocalesService', function() {
return {
isAvalaible: function(){
if(typeof(Storage)!=="undefined")
{
@abelorian
abelorian / scmplayer.html
Last active August 29, 2015 14:10
SCM player javascript
<!-- SCM Music Player http://scmplayer.net -->
<script type="text/javascript" src="http://scmplayer.net/script.js"
data-config="{'skin':'skins/black/skin.css','volume':60,'autoplay':'true','shuffle':'true','repeat':1,'placement':'top','showplaylist':true,'playlist':[{'title':'The Strokes - Heart In A Cage','url':'https://dl.dropbox.com/u/26001101/music/The Strokes - Heart In A Cage.mp3'},{'title':'Makiza - En Paro','url':'https://dl.dropbox.com/u/26001101/music/Makiza - En Paro.mp3'},{'title':'Pablo Milanes - Yo Pisar%E9 las Calles Nuevamente','url':'https://dl.dropbox.com/u/26001101/music/09 - Yo Pisare las Called Nuevamente - Pablo Milanes.mp3'},{'title':'Silvio Rodriguez - Aunque No Este De Moda.mp3','url':'https://dl.dropbox.com/u/26001101/music/08 - Aunque No Este De Moda.mp3'},{'title':'Janis Joplin - Cry Baby','url':'https://dl.dropbox.com/u/26001101/music/Janis Joplin - Cry Baby.mp3'},{'title':'Lana del Rey - Blue jeans','url':'https://www.youtube.com/watch?v=JRWox-i6aAk'},{'title':'The Strokes - Som
References:
http://blog.carbonfive.com/2012/02/27/supporting-cross-domain-ajax-in-rails-using-jsonp-and-cors/
https://github.com/cyu/rack-cors
http://nelm.io/blog/2011/11/cors-with-sencha-touch/
http://jessehowarth.com/2011/04/27/ajax-login-with-devise
=============================================================================================================
GEMFILE
=============================================================================================================
gem 'rack-cors', :require => 'rack/cors'
@abelorian
abelorian / seconds_to_hh-mm-ss.js
Created February 7, 2015 06:50
Seconds to HH:MM:SS
function sec(time){
var all_time = time;
var hours = Math.floor(time / 3600);
var minutes = Math.floor((time % 3600)/60);
var seconds = time % 60;
minutes = minutes < 10 ? '0' + minutes : minutes;
seconds = seconds < 10 ? '0' + seconds : seconds ;
var result = hours +" : " + minutes + " : " + seconds;
return result;
@abelorian
abelorian / css_seed.css
Last active August 29, 2015 14:15
CSS Quick Snippets
/* bootstrap's row hack */
.row_{margin-left:0;margin-right:0}.row_:after{clear:both}.row_:before,.row_:after{content:" ";display:table}
/* Containers*/
.full-width: {
width: 100%;
}
@abelorian
abelorian / transbank_webpayplus.md
Last active August 29, 2015 14:17
Errores comunes al instalar WebPayPlus de Transbank

#MODO CERTIFICACION

##Error 500

Los permisos de los archivos no están en 755. O subiste los archivos cgi en modo ASCII. Debe ser en Binario. Los archivos de config y maestros DEBEN estar en ASCII.

Asegúrate de que no estás usando la versión de 64 bits en un sistema de 32.

Desaparece el filtroUnificado de la URL