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
(map #(+ 2 %) (range 0 5)) |
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
# Long description of the situation can be found here: | |
# http://ask.xmodulo.com/open-port-firewall-centos-rhel.html | |
# Following two lines get the job done. | |
firewall-cmd --zone=public --add-port=80/tcp --permanent | |
firewall-cmd --reload |
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
# For using Lithuanian characters in the remote shell | |
LC_CTYPE=en_US.UTF-8 |
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
/* | |
* This fixes some strance method overloading error: | |
* NoSuchMethodError org.tartarus.snowball.ext.LithuanianStemmer.slice_from(Ljava/lang/CharSequence;)V | |
*/ | |
protected void slice_from(String cs) { | |
super.slice_check(); | |
String current = super.getCurrent(); | |
StringBuilder sb = new StringBuilder(current); | |
sb.replace(this.bra, this.ket, cs); | |
this.setCurrent(sb.toString()); |
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
(defn- get-liquibase | |
"Creates Liquibase instance for given connection and sets logging level." | |
[connection] | |
(let [liq-conn (JdbcConnection. connection) | |
liq-db-factory (DatabaseFactory/getInstance) | |
liq-database (.findCorrectDatabaseImplementation liq-db-factory liq-conn)] | |
(.setLogLevel (LogFactory/getLogger) (LogLevel/SEVERE)) | |
(Liquibase. "db/changelog.xml" (ClassLoaderResourceAccessor.) liq-database))) |
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
(ns project.ns-test | |
(:require [ring.mock.request :as rr])) | |
(rr/body | |
(rr/content-type | |
(rr/request :post "/do") | |
"application/json") | |
(ch/generate-string [{:name "Name" | |
:countryCode "US"}])) |
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
mysqldump -P [port] -h [host] -u [username] -p [password] > [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
(set! (.. js/document -body -style -backgroundColor) "red") |
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
(def contact | |
{:firstname "John" | |
:lastname "Smith" | |
:age 25 | |
:contacts {:phone "+44.123.456.789" | |
:emails {:work "jsmith@company.com" | |
:personal "jsmith@some-email.com"}}}) | |
;; Just the top level | |
(let [{lastname :lastname} contact] |
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
[[:input (h/attr= :name "host")]] |
OlderNewer