Skip to content

Instantly share code, notes, and snippets.

View intinig's full-sized avatar

Giovanni Intini intinig

View GitHub Profile
79.125.61.76 ================================================================================
79.125.61.76
79.125.61.76 Recipe Compile Error in /var/chef/cache/cookbooks/postfix/recipes/client.rb
79.125.61.76 ================================================================================
79.125.61.76
79.125.61.76 Net::HTTPServerException
79.125.61.76
79.125.61.76 ------------------------
79.125.61.76
79.125.61.76 400 "Bad Request"
override_attributes(
"postfix" => {
"mail_relay_query" => "role:vdp-* OR role:blog-vdp",
"mydomain" => "vinodalproduttore.it",
"myorigin" => "vinodalproduttore.it"
}
)
link "/etc/apache2/sites-enabled/#{h["domain"]}" do
to "/etc/apache2/sites-available/#{h["domain"]}"
notifies :restart, "service[apache2]"
only_if {h["enabled"]}
end
link "/etc/apache2/sites-enabled/#{h["domain"]} remove" do
target_file "/etc/apache2/sites-enabled/#{h["domain"]}"
to "/etc/apache2/sites-available/#{h["domain"]}"
notifies :restart, "service[apache2]"
;; save backups and autosaves in a better place
(setq backup-directory-alist `(("." . ,(concat user-emacs-directory "backups"))))
(setq auto-save-file-name-transforms
`((".*" ,(expand-file-name (concat user-emacs-directory "backups")) t)))
module Prestashop
include HTTParty
base_uri 'www.vinodalproduttore.it'
basic_auth 'SEGRETO!', ''
debug_output STDOUT
format :xml
def self.get_collection(klass)
get("/api/#{klass.pluralize}")["prestashop"]["#{klass.pluralize}"][klass].sort_by {|item| item["id"].to_i}
end
alias ec='emacsclient -n -a "vim" "$@"'
export EDITOR='emacsclient -c -a "vim" "$@"'
{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
github_creds = Chef::EncryptedDataBagItem.load("passwords", "github")
github_command_string = "github-key-upload -k /var/apps/.ssh/id_dsa.pub -u #{github_creds["user"]} -P #{github_creds["password"]} -t #{Chef::Config[:node_name]}"
def getCol(source: scala.io.BufferedSource, col: Int): String = {
return source.reset.getLines.map { line => line.charAt(col)}.mkString
}
def checkWinner(line: String) {
if (line == "xxx") {
println("x wins")
} else if (line == "ooo") {
println("o wins")
}
sealed trait Move
case object X extends Move
case object O extends Move
case object _ extends Move