This file contains hidden or 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
| use admin | |
| db.createUser({user:'root',pwd:'ADMPASS',roles:['root']}) | |
| mongo -u root -p ADMPASS localhost/admin | |
| use MYDB | |
| db.createUser({user:'MYUSER',pwd:'MYPASS',roles:['readWrite']}) | |
| mongo -u MYUSER -p MYPASS localhost/MYDB |
This file contains hidden or 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
| function parse_qs() | |
| { | |
| var parsedParameters = {}; | |
| var qs = location.search.substr(1); | |
| var uriParameters = qs.split('&'); | |
| for (var i = 0; i < uriParameters.length; i++) | |
| { | |
| var p = uriParameters[i].split('='); | |
| parsedParameters[p[0]] = decodeURIComponent(p[1]); |
This file contains hidden or 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 validate-first_name [params] | |
| (if-let [nm (-> params :first_name str s/trim norm-first_name)] | |
| {:first_name nm} | |
| {::err "wrong first_name" :fld :first_name})) | |
| ; | |
| (defn validate-last_name [params] | |
| (if-let [nm (-> params :last_name str s/trim norm-last_name)] | |
| {:last_name nm} | |
| {::err "wrong last_name" :fld :last_name})) |
This file contains hidden or 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
| commentArea.addEventListener('keydown', autosize); | |
| function autosize () { | |
| var el = this; | |
| setTimeout(function () { | |
| el.style.cssText = 'height:auto;'; | |
| el.style.cssText = 'height:' + el.scrollHeight + 'px'; | |
| }, 0); | |
| } |
This file contains hidden or 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 autourl-transformer [text state] | |
| [(if (:code state) | |
| text | |
| (string/replace | |
| text | |
| #"<https?://[-A-Za-z0-9+&@#/%?=~_()|!:,.;]*[-A-Za-z0-9+&@#/%=~_()|]>" | |
| #(let [url (subs % 1 (dec (count %)))] | |
| (str "<a href=\"" url "\">" url "</a>")))) | |
| state]) | |
This file contains hidden or 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
| echo 100 > "/sys/module/ipmi_si/parameters/kipmid_max_busy_us" |
This file contains hidden or 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
| Y = 0.21*R + 0.72*G + 0.07*B > 80% for light background | |
| https://events.yandex.ru/lib/talks/2491/ | |
| (7:38) |
This file contains hidden or 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
| #define SSID "wi-fi_login" // ваш SSID | |
| #define PASS "wi-fi_password" // ваш пароль Wi-Fi | |
| #define SMTPServer "s02.atomsmtp.com" //smtp сервер | |
| #define SMTPPort "2525" // smtp порт | |
| #define MailLogin "[email protected]" // логин для smtp | |
| #define MailLoginBase64 "dWd1LCBrb25lNG5vCg==" //логин для smtp в Base64 | |
| #define MailPasswordBase64 "aHJlbiB0YW0K" // пароль для smtp в Base64 | |
| #define MailRelay "[email protected]" // промежуточная почта для "отмывания" email | |
| #define PhoneNumber "375290000000" // номер телефона |
This file contains hidden or 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
| // | |
| // http://playground.arduino.cc/Learning/OneWire | |
| // | |
| #include <OneWire.h> | |
| #define ONEWIRE_PIN 2 | |
| OneWire ds(ONEWIRE_PIN); |
This file contains hidden or 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
| !READ FIRST! | |
| http://sqlite.mobigroup.ru/wiki?name=sqlite3-dbf | |
| http://sqlite.mobigroup.ru/wiki?name=sqlite3-kladr | |
| Orig: http://www.opennet.ru/tips/2862_postgresql_kladr.shtml | |