Skip to content

Instantly share code, notes, and snippets.

View heliohead's full-sized avatar
🏠
Working from home

Helio Oliveira heliohead

🏠
Working from home
View GitHub Profile
Dim objShell, lngMinutes, boolValid
Set objShell = CreateObject("WScript.Shell")
lngMinutes = InputBox("How long you want to keep your system awake?" & Replace(Space(5), " ", vbNewLine) & "Enter minutes:", "Awake Duration") 'we are replacing 5 spaces with new lines
If lngMinutes = vbEmpty Then 'If the user opts to cancel the process
'Do nothing
Else
On Error Resume Next
Err.Clear
boolValid = False
@heliohead
heliohead / rename_phoenix_project.sh
Created May 4, 2021 12:43 — forked from rlopzc/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="Zauberantrag"
CURRENT_OTP="zauberantrag"
NEW_NAME="Wunderantrag"
NEW_OTP="wunderantrag"
This file has been truncated, but you can view the full file.
2021-02-20 11:07:02,882 - crypto_trader_logger - INFO - Started
2021-02-20 11:07:02,883 - crypto_trader_logger - INFO - Setting initial coin to BRL
2021-02-20 11:08:08,565 - crypto_trader_logger - INFO - Started
2021-02-20 11:08:08,566 - crypto_trader_logger - INFO - Setting initial coin to USDT
2021-02-20 11:11:04,934 - crypto_trader_logger - INFO - Started
2021-02-20 11:11:04,935 - crypto_trader_logger - INFO - Setting initial coin to USDT
2021-02-20 11:13:11,645 - crypto_trader_logger - INFO - Started
2021-02-20 11:13:11,646 - crypto_trader_logger - INFO - Setting initial coin to ADA
2021-02-20 11:13:12,148 - crypto_trader_logger - INFO - Initializing XLM vs XLM
2021-02-20 11:13:12,148 - crypto_trader_logger - INFO - Initializing XLM vs TRX
@heliohead
heliohead / radio_system.liq
Created January 15, 2019 12:32 — forked from GeekBrony/radio_system.liq
Liquidsoap Radio System
###########################################################################################
# Liquidsoap Radio System - built by GeekBrony, based from Liquidsoap. #
###########################################################################################
# Primary Features:
# - AutoDJ that crossfades between songs and has a 1/10 chance of landing on a Station ID/Jingle/Ad.
# - AutoDJ also selects tracks from "High Priority", "Low Priority" and "New Songs" playlists randomly.
# - Live Shows (that automatically dump to a directory)
# - Mic to speak over the stream.
# - Requests via Telnet/Web Interface, which have a 80-90% chance of queuing up when a song ends.
@heliohead
heliohead / pre-commit
Last active January 29, 2018 19:06 — forked from wacko/pre-commit
Git hook to avoid commit debug lines (binding.pry console.log debugger...)
#!/usr/bin/env ruby
# .git/hooks/pre-commit
# Don't forget of make this file executable by chmod a+x
# Validates that you don't commit forbidden keywords to the repo
# You can skip this checking with 'git commit --no-verify'
exit 0 if ARGV.include?('--no-verify')
# Update this list with your own forbidden keywords
@heliohead
heliohead / brazilian_cities.csv
Created November 5, 2017 14:10
List of Brazilians cities with population, lat an long
uf name iso iso_ddd population lat lng
'RO' 'Alta Floresta D\'oeste' 1100015 '69' 25578 '-11.9287293' '-61.9958651'
'RO' 'Ariquemes' 1100023 '69' 104401 '-9.9061087' '-63.0330263'
'RO' 'Cabixi' 1100031 '69' 6355 '-13.4623774' '-60.6285091'
'RO' 'Cacoal' 1100049 '69' 87226 '-11.434693' '-61.4566885'
'RO' 'Cerejeiras' 1100056 '69' 17986 '-13.2109867' '-61.2801996'
'RO' 'Colorado do Oeste' 1100064 '69' 18817 '-13.1178429' '-60.5459451'
'RO' 'Corumbiara' 1100072 '69' 8842 '-12.9986334' '-60.9460084'
'RO' 'Costa Marques' 1100080 '69' 16651 '-12.4380262' '-64.2268052'
'RO' 'Espigão D\'oeste' 1100098 '69' 32385 '-11.5323149' '-61.0169967'
@heliohead
heliohead / feature_helper.rb
Created April 4, 2017 00:06
Compile assets before run rspec features test
# spec/support/feature_helper.rb
RSpec.configure do |config|
config.before :all do
ENV['PRECOMPILE_ASSETS'] ||= begin
case self.class.metadata[:type]
when :feature, :view
STDOUT.write "Precompiling assets..."
system "bundle exec rake assets:precompile > /dev/null 2>&1"
@heliohead
heliohead / .vimrc
Last active November 27, 2016 19:10 — forked from aristotelesbr/.vimrc
my vimrc
"*****************************************************************************
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
let g:vim_bootstrap_langs = "elixir,javascript,python,ruby"
@heliohead
heliohead / rake_db.rb
Created January 17, 2016 22:07
Rails data base rake
rake db:migrate # runs (single) migrations that have not run yet.
rake db:create # creates the database
rake db:drop # deletes the database
rake db:schema:load # creates tables and columns within the (existing) database following schema.rb
rake db:setup does db:create, db:schema:load, db:seed
rake db:reset does db:drop, db:setup
@heliohead
heliohead / db.rake
Created October 19, 2015 10:26 — forked from hopsoft/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd