Skip to content

Instantly share code, notes, and snippets.

View ricardodantas's full-sized avatar
👋
hi!

Ricardo Dantas ricardodantas

👋
hi!
View GitHub Profile
@ricardodantas
ricardodantas / Laravel-capistrano-deploy.rb
Last active July 28, 2017 14:02 — forked from purwandi/deploy.rb
Laravel deployment with capistrano
set :application, "App Name" # Your app name
set :repository, "git@github.com:xxxxx/xxx.git" # Your git repository
set :document_root, "/home/user/www/awesome_app"
set :deploy_via, :remote_cache
# SSH Settings
set :user, "user_ssh"
set :password, "password_ssh"
set :use_sudo, false
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
// Example:
JavaScript.load("/javascripts/something.js");
// With callback (that’s the good thing):
JavaScript.load("http://www.someawesomedomain.com/api.js", function() {
API.use(); // or whatever api.js provides ...
});
// Mixin
@mixin keyframes($name) {
@-moz-keyframes #{$name} { @content; }
@-webkit-keyframes #{$name} { @content; }
@-o-keyframes #{$name} { @content; }
@-ms-keyframes #{$name} { @content; }
@-khtml-keyframes #{$name} { @content; }
@keyframes #{$name} { @content; }
}
@ricardodantas
ricardodantas / README.md
Created August 30, 2013 16:38 — forked from oodavid/README.md
deploy with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
#!/bin/sh
#
# This hook does two things:
#
# 1. update the "info" files that allow the list of references to be
# queries over dumb transports such as http
#
# 2. if this repository looks like it is a non-bare repository, and
# the checked-out branch is pushed to, then update the working copy.
# This makes "push" function somewhat similarly to darcs and bzr.
@ricardodantas
ricardodantas / hide-text.scss
Last active August 29, 2015 13:56 — forked from anonymous/mycode.js
A hide text SCSS mixin.
// How to use: @include hide-text;
@mixin hide-text() {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
# ----------------------------------------------------------------------
# /PUBLIC folder .htaccess
# ----------------------------------------------------------------------
# This .htaccess file is recommended
# to be placed at root/public folder
# of your Laravel powered application
# ----------------------------------------------------------------------
# This file works with Laravel 3 and 4
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and
define(function (require) {
var module;
// Setup temporary Google Analytics objects.
window.GoogleAnalyticsObject = "ga";
window.ga = function () { (window.ga.q = window.ga.q || []).push(arguments); };
window.ga.l = 1 * new Date();
// Immediately add a pageview event to the queue.
@ricardodantas
ricardodantas / paymo.js
Last active August 29, 2015 14:20 — forked from yisraeldov/paymo.js
//Paymo API
/**
* This is a quick wrapper for the Paymo 3.0 API
* Requires (jquery.rest)[https://github.com/jpillora/jquery.rest]
*
* Copyright (c) 2014 Yisrael Dov Lebow <lebow@lebowtech.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights