Skip to content

Instantly share code, notes, and snippets.

View caiotarifa's full-sized avatar
💻
Coding...

Caio Tarifa caiotarifa

💻
Coding...
View GitHub Profile
var Application = (function(parent, $, window, document, undefined) {
'use strict';
var self = parent.module = parent.module || {};
function privateExample() {
return false;
}
self.publicExample = function() {
function sendPayment() {
var sheet, last, prices, person;
function getColumnByLastRow(column) {
return sheet.getRange(last.row, column).getValue().toString();
}
sheet = SpreadsheetApp.getActiveSheet();
last = {
@caiotarifa
caiotarifa / TimeTrello.rb
Last active March 15, 2016 12:49
TimeTrello: Simple time tracking with Trello & Ruby.
require 'trello'
# Key & Token
TRELLO_DEVELOPER_PUBLIC_KEY = ''
TRELLO_MEMBER_TOKEN = ''
# General
BOARD_ID = ''
PREFIX = ':clock12: '
@caiotarifa
caiotarifa / timeago.js
Last active April 7, 2021 21:30
"Distance of Time in Words" in Vanilla JavaScript.
var TimeAgo = (function() {
var self = {};
// Public Methods
self.locales = {
prefix: '',
sufix: 'ago',
seconds: 'less than a minute',
minute: 'about a minute',
var Sticky = function(selector, containerSelector) {
var element = document.querySelector(selector),
containerElement = document.querySelector(containerSelector),
elementTop = parseInt(window.getComputedStyle(element, null).marginTop),
stickedClass = 'sticked',
grabEndClass = 'grab-end',
elementStart, containerElementFinish;
var BigCoffee = function(selector) {
var elements = document.querySelectorAll(selector),
index = 0;
if (this === window) {
return new BigCoffee(selector);
}
for (; index < elements.length; index++) {
this[index] = elements[index];