Skip to content

Instantly share code, notes, and snippets.

View gessgallardo's full-sized avatar
🚀
Delivering!

Gess Gallardo gessgallardo

🚀
Delivering!
View GitHub Profile
@gessgallardo
gessgallardo / __replit_main__
Created March 1, 2019 12:21
Moment.js Example created by gessgallardo - https://repl.it/@gessgallardo/Momentjs-Example
let moment = require("moment-timezone");
function subscriptionDateHandler(customTime, firstOrder){
let localTime;
if(customTime == undefined){
localTime = moment().tz("America/Montreal");
}else{
localTime = moment(customTime._d).tz("America/Montreal")
}
@gessgallardo
gessgallardo / metroscubicos.rb
Created November 10, 2018 03:37
[Metroscubicos] Precios promedio de vivienda
require 'mechanize'
require 'nokogiri'
require 'active_support/core_ext/string'
require 'csv'
puts "Start Scrapping"
mecha = Mechanize.new
delegaciones = [
"alvaro-obregon",
class GoogleStore
require 'google/api_client'
GOOGLE_KEY = 'google_key'
GOOGLE_SECRET = 'google_secret'
APP_NAME = 'webstore'
APP_VERSION = '1.1.0'
def self.process_receipt(transaction_receipt)
package_name = transaction_receipt.package_name
@gessgallardo
gessgallardo / apachebuddy.pl
Last active August 5, 2016 16:55
Apache Buddy to get max clients and basic stuff for your apache
#!/usr/bin/perl
#
# author: jacob walcik
# version: 0.3
# description: This will make some recommendations on tuning your Apache
# configuration based on your current settings and Apache's memory usage
#
# acknowledgements: This script was inspired by Major Hayden's MySQL Tuner
# (http://mysqltuner.com).
/* Enter Your Custom CSS Here */
.logo-header {width:100%}
nav ul.menu li > a {text-transform: none;}
.stp_l {
position: relative;
height: 210px;
margin-left: 3px;
width: 659px;
}
.stp_r {
@gessgallardo
gessgallardo / AppStore.rb
Last active July 7, 2016 21:48 — forked from sauloarruda/receipt
Apple iOS in app purchase validate receipt in Ruby
# This module is created to test the apple sandbox in app purchase server to validate a receipt using Ruby Code.
# Based on VerifyReceipt.rb [@sauloarruda (http://twitter.com/sauloarruda)]
# AppStore.rb by @gessgallardo (http://twitter.com/gessgallardo)
require "faraday"
require "faraday_middleware"
module AppStore
class Requestor
attr_accessor :test
@gessgallardo
gessgallardo / MailgunS3Attachment.rb
Created July 6, 2016 00:29 — forked from masonoise/MailgunS3Attachment.rb
Wrapper class to enable using AWS S3 objects as attachments when sending mail via the Mailgun REST interface using RestClient. This allows reading directly from the S3 object instead of creating an intermediate temp file.
#
# This class will wrap an S3 object and provide the methods that the Mailgun library expects in order
# to use the S3 object for sending a mail attachment.
#
# Use as follows:
#
# data = Multimap.new
# data[:from] = "My Self <no-reply@example.com>"
# data[:subject] = "Subject"
# data[:to] = "#{recipients.join(', ')}"
@gessgallardo
gessgallardo / db_install
Created April 18, 2016 15:10
Heroku PG DB import
#!/bin/bash
for i in "$@"
do
case $i in
-d=*|--database=*)
DB="${i#*=}"
shift # past argument=value
;;
-a=*|--app=*)