Skip to content

Instantly share code, notes, and snippets.

View andreferraro's full-sized avatar
🎯
Focusing

Andre Ferraro andreferraro

🎯
Focusing
  • Brazil
  • 17:59 (UTC -03:00)
View GitHub Profile
@andreferraro
andreferraro / youtube_comment_bot.py
Created July 30, 2018 19:24 — forked from streetgt/youtube_comment_bot.py
Youtube Comment Bot - python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python bot for comment a list of urls in YouTube
import time
import numpy as np
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
@andreferraro
andreferraro / monit
Created February 12, 2018 05:24 — forked from roman01la/monit
Node.js + Nginx + Varnish + Upstart + Monit
check host localhost with address 127.0.0.1
start "/sbin/start myapp"
stop "/sbin/stop myapp"
if failed port 3000 protocol HTTP
request /
with timeout 5 seconds
then restart
@andreferraro
andreferraro / fullcalendar_with_ionic2.md
Created August 18, 2017 19:47 — forked from netcell/fullcalendar_with_ionic2.md
Fullcalendar.io with ionic 2 from forum

Hello Victor,

I just started using this plugin today so I'm not an expert but here is what I did to make it work.

  1. npm install angular2-fullcalendar --save
  2. Create a new component: ionic g component full-calendar
  3. In full-calendar.html I inserted:
<angular2-fullcalendar [options]="calendarOptions"></angular2-fullcalendar>
@andreferraro
andreferraro / 01_Laravel 5 Simple ACL manager_Readme.md
Created June 5, 2016 05:50 — forked from amochohan/01_Laravel 5 Simple ACL manager_Readme.md
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.

Installation

Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

@andreferraro
andreferraro / form_macro.php
Created October 14, 2015 12:07 — forked from brwnll/form_macro.php
Laravel 4 form inputs for Number and Telephone
<?php
/***
* If you prefer automatic updates or using packages, this is available as a composer
* package: https://github.com/smalldogs/html5inputs
*
* Thank you to @silentcoast for the adding the support of non-valued attributes (such as `required`)
*
* This file allows you to use the other 11 HTML elements the same way as text, email, and URL.
*
* 1. Create the folder /app/misc, or use your preferred directory
@andreferraro
andreferraro / smtpteste.rb
Created January 28, 2012 02:11 — forked from geoffgarside/gist:157771
Validate Email Addresses Via SMTP
#!/usr/bin/env ruby
# Usage: $0 hostname email_addr
#
# Performs a basic SMTP delivery check, it connects to the target SMTP server, sends
# a HELO command, then a MAIL FROM followed by a RCPT TO. This should verify that
# the server is a) contactable b) permits the sender and c) accepts the recipient.
require 'socket'
require 'net/telnet'
me = Socket.gethostname
require 'prawn/layout'
require 'prawn/format'
bill_address = @order.bill_address
ship_address = @order.ship_address
font "Helvetica"
image Spree::PrintInvoice::Config[:print_invoice_logo_path], :at => [0,720], :scale => 0.65
# Removendo as paginas que nao iremos utilizar
run "rm README"
run "rm doc/README_FOR_APP"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
#Colando a rota padrao
route %(map.root :controller => "dashboard")