This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
# Load the base YAML file | |
base_data = YAML.load(File.read('config.yml')) | |
# Load the new data from a separate YAML file | |
version7_data = YAML.load(File.read('new_data.yml')) | |
# Merge the original data with the new data, overwriting the specified keys | |
actual_data = base_data.merge(version7_data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as XLSX from 'xlsx'; | |
function generateExcelTemplate() { | |
// Create a new workbook | |
const workbook = XLSX.utils.book_new(); | |
// Define your data | |
const data = [ | |
['Name', 'Email', 'Age'], | |
['John Doe', 'john@example.com', 30], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var allValues = <%== @summary.data.dig('gender_representation', 'chart_data').values.map(&:values) %> | |
var maleFemaleColors = ['rgb(142, 1, 53)', 'rgb(0, 137, 140)']; | |
var data = [ | |
{ | |
values: allValues[0], | |
type: 'pie', | |
name: 'Operactional Functions', | |
marker: { | |
colors: maleFemaleColors | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "Versão", | |
"about": "Sobre", | |
"ok": "OK", | |
"account": "Conta", | |
"notes": "Notas", | |
"history": "Histórico", | |
"budget": "Orçamento", | |
"tradingPl": "Negociação", | |
"contacts": "Contactos", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/ruby | |
# author: extrapolo.com | |
# scraps all min,max temperature from Nova Friburgo, Rj, Brazil from accuweather.com since 1992 | |
require "selenium-webdriver" | |
require "byebug" | |
profile['browser.frames.enabled'] = false | |
profile['plugin.state.flash'] = 0 | |
profile['network.http.prompt-temp-redirect'] = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# extrapolo.com | |
require 'selenium-webdriver' | |
require "nokogiri" | |
def driver | |
Selenium::WebDriver.for :firefox, options: Selenium::WebDriver::Firefox::Options.new( | |
args: ['-headless'] | |
) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"artists":[{"name":"Gerônimo","albums":[{"title":"Eu Sou Negão","year":1987,"genre":"MPB","tracks":[{"title":"Jubiabá","num":1,"path":"unzips/UQT1987_Geronimo_-_Eu_sou_Negao/01 Jubiabá.mp3"},{"title":"Vida que Passamos","num":2,"path":"unzips/UQT1987_Geronimo_-_Eu_sou_Negao/02 Vida que Passamos.mp3"},{"title":"Macuxi Muita Onda (Eu Sou Negão)","num":3,"path":"unzips/UQT1987_Geronimo_-_Eu_sou_Negao/03 Macuxi Muita Onda (Eu Sou Negão).mp3"}]},{"title":"Página Musical","year":1982,"genre":"MPB","tracks":[{"title":"Arzinho da Ribeira","num":1,"path":"unzips/UQT1982_Geronimo-PaginaMusical/01 Arzinho da Ribeira.mp3"},{"title":"Dança das Águas","num":2,"path":"unzips/UQT1982_Geronimo-PaginaMusical/02 Dança das Águas.mp3"},{"title":"Cigarro Colomy","num":3,"path":"unzips/UQT1982_Geronimo-PaginaMusical/03 Cigarro Colomy.mp3"},{"title":"Cabeça D'água","num":4,"path":"unzips/UQT1982_Geronimo-PaginaMusical/04 Cabeça D'água.mp3"},{"title":"Nena, Jacira e Dodô","num":5,"path":"unzips/UQT1982_Geronimo-PaginaMusical/05 Nena |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
#require 'mysql2' | |
require 'mechanize' | |
require 'parallel' | |
require 'byebug' | |
require 'awesome_print' | |
require 'colorize' | |
require 'csv' | |
require 'json' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -density 220 in.pdf to_img_.jpg | |
mogrify -trim to_img_*.jpg | |
convert -append to_img_*.jpg out.jpg | |
rm to_img_* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'mysql2' | |
require 'mechanize' | |
require 'parallel' | |
require 'byebug' | |
require 'awesome_print' | |
require 'colorize' | |
require 'csv' |
NewerOlder