Skip to content

Instantly share code, notes, and snippets.

View carlosrojaso's full-sized avatar
🎯
Focusing

Carlos Rojas carlosrojaso

🎯
Focusing
View GitHub Profile
@carlosrojaso
carlosrojaso / Hicarlos.js
Last active April 16, 2016 14:00
Hi Carlos
Twitter: @carlosrojas_o
Email: ing.carlosandresrojas@gmail.com
Youtube: https://youtube.com/carlosrojas84
@carlosrojaso
carlosrojaso / app.js
Created March 7, 2015 22:32
orientation
window.addEventListener("orientationchange", handleOrientation, true);
function handleOrientation(){
if (Math.abs(window.orientation) == 90) {
angular.element(document.querySelector('#imagenBackground')).attr("src","img/background-landscape.png");
angular.element(document.querySelector('#imagen-Background')).css("width","35%");
} else {
angular.element(document.querySelector('#imagenBackground')).attr("src","img/background-portrait.png");
angular.element(document.querySelector('#imagen-Background')).css("width","45%");
}
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
<form action="." method="post">
<noscript>You must <a href="http://www.enable-javascript.com" target="_blank">enable JavaScript</a> in your web browser in order to pay via Stripe.</noscript>
<input
type="submit"
value="Pay with Card"
data-key="PUBLISHABLE STRIPE KEY"
data-amount="500"
data-currency="cad"
data-name="Example Company Inc"
@carlosrojaso
carlosrojaso / toast.js
Created August 11, 2014 08:47
alert with jquerymobile
function toast(message) {
var $toast = $('<div class="ui-loader ui-overlay-shadow ui-body-e ui-corner-all"><h3>' + message + '</h3></div>');
$toast.css({
display: 'block',
background: '#fff',
opacity: 0.90,
position: 'fixed',
padding: '7px',
'text-align': 'center',
$(function() {
// Let's do something with Google Maps:
var canvas = $( "#map_canvas" );
var myLatlng = new google.maps.LatLng( -34.397, 150.644 );
var myOptions = {
zoom: 8,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
// Custom effects with .animate()
$( "div.funtimes" ).animate({
left: "+=50",
opacity: 0.25
},
300, // Duration
function() { // Callback when the animation is finished
console.log( "done!" );
}
);
// Hide all level 1 headings over half a second; then wait for 1.5 seconds
// and reveal all level 1 headings over 0.3 seconds
$( "h1" ).hide( 500 ).delay( 1500 ).show( 300 );
// Create a button to stop all animations on the page:
$( "<button type='button'></button>" )
.text( "Stop All Animations" )
.on( "click", function() {
$( "body *" ).filter( ":animated" ).stop();
})
.appendTo( document.body );