Skip to content

Instantly share code, notes, and snippets.

View rickybell's full-sized avatar

Rickybell rickybell

  • Bex-web Systems Informatica Ltda ME
  • Lisboa - Porgutal
  • 14:37 (UTC +01:00)
View GitHub Profile
@rickybell
rickybell / package.json
Created April 25, 2023 22:02
Basic package.json for to complement a script to create a node.js project via script automation.
{
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "echo \"Error: no test specified\" && exit 1",
"start": "echo \"Error: no test specified\" && exit 1"
}
}
@rickybell
rickybell / file_sync.rb
Last active May 30, 2019 19:34
Script de cópia de sincronização de arquivos entre uma máquina cliente e um servidor.
#!/usr/bin/env ruby
require 'filewatcher'
require 'net/ssh'
require 'net/sftp'
## Validando a entrado dos parâmetros.
if (ARGV.size == 2)
# diretorio local
@rickybell
rickybell / Script to create cupons in batch mode
Created November 4, 2016 15:03
Este Gist, foi criado com o intuito de gerar cupons em batch(quantidades). Tem alguns parâmetros meio q intuitivos...
class CreateCouponsByBatchAmount
def self.go(amount,coupon_type,value,lifetime,gift_card = true,separator = ",")
puts "Start:\n"
labels = ""
(amount).times do |x|
tmp_coupon = Basico::Coupon.random_coupon(coupon_type,value)
tmp_coupon.valid_until = DateTime.now + lifetime.days
tmp_coupon.gift_card = gift_card || nil
tmp_coupon.save
labels += [tmp_coupon.label.upcase,separator].join("")