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
❱ git config user.signingKey 38AF394C | |
❱ git config commit.gpgSign true | |
❱ echo "test" | gpg --clearsign | |
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
test | |
gpg: signing failed: Inappropriate ioctl for device | |
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device |
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
compressed_filestream = Zip::OutputStream.write_buffer(::StringIO.new(''), Zip::TraditionalEncrypter.new('password')) do |zos| | |
#First file | |
zos.put_next_entry "test1.csv" | |
csv = CSV.generate do |csv| | |
User.all.each do |user| | |
csv << [user.id, user.name] | |
end | |
csv << values | |
end | |
zos.print csv |
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 '[clojure.string :as str]) | |
;; In this use case, a valid expression won't have an even number of lexemes | |
(defn valid-length? [lexemes] | |
(odd? (count lexemes))) | |
(defn valid-paren-count? [lexemes] | |
(let [opens (filter #(= "(" %) lexemes) | |
closes (filter #(= ")" %) lexemes)] | |
(= (count opens) (count closes)))) |