Skip to content

Instantly share code, notes, and snippets.

View dongalor's full-sized avatar
💻
coding

Garblovian dongalor

💻
coding
View GitHub Profile
@dongalor
dongalor / push.json
Last active March 27, 2018 14:58
push config parse
// skipped
push: {
ios: {
pfx: "/home/parse/certs/third_distr_push.p12",
passphrase: "",
bundleId: "com.example.AppName",
production: true
}
}
Printing description of error:
Error Domain=NSURLErrorDomain Code=-1005 "Сетевое соединение потеряно." UserInfo={NSUnderlyingError=0x1c044b4c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x1c02924d0 [0x1b753f310]>{length = 16, capacity = 16, bytes = 0x100201bb52cae4420000000000000000}, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=https://example.com/method, NSErrorFailingURLKey=https://example.com/method, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=57, NSLocalizedDescription=Сетевое соединение потеряно.}
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -X
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -I INPUT 1 -i lo -j ACCEPT
} 2018.02.20 13:05:26
__________ 2018.02.20 13:05:26
LOGIN REQUEST: signIn 2018.02.20 13:05:45
X-Parse-Session-Token = null 2018.02.20 13:05:45
<NSURLRequest: 0x1c4019db0> { URL: https://example.com/parse/functions/signIn } 2018.02.20 13:05:45
__________ 2018.02.20 13:05:45
LOGIN RESPONCE: signIn completed 2018.02.20 13:05:45
device: iPhone10,6 iOS: 11.20 2018.02.20 13:05:45
{
result = {
__________ 2018.02.20 13:06:02
LOGIN REQUEST: getNewsItem 2018.02.20 13:06:28
X-Parse-Session-Token = r:0a6cd572b46d086cc6696bd3f1fbe46c 2018.02.20 13:06:28
<NSURLRequest: 0x1c001b180> { URL: https://example.com/parse/functions/getNewsItem } 2018.02.20 13:06:28
__________ 2018.02.20 13:06:28
LOGIN RESPONCE: getNewsItem completed 2018.02.20 13:06:28
LOGIN REQUEST: getNewsPreviews 2018.02.20 13:15:50
X-Parse-Session-Token = r:0a6cd572b46d086cc6696bd3f1fbe46c 2018.02.20 13:15:50
<NSURLRequest: 0x1cc018970> { URL: https://example.com/parse/functions/getNewsPreviews } 2018.02.20 13:15:50
D, [2018-02-09T17:04:12.088183 #32330] DEBUG -- : Admin Load (0.6ms) SELECT "admins".* FROM "admins" INNER JOIN "admins_gifts" ON "admins"."id" = "admins_gifts"."admin_id" WHERE "admins_gifts"."gift_id" = $1 [["gift_id", 20]]
D, [2018-02-09T17:04:12.094696 #32330] DEBUG -- : Order Load (0.4ms) SELECT "orders".* FROM "orders" WHERE "orders"."gift_id" = $1 [["gift_id", 20]]
D, [2018-02-09T17:04:12.101551 #32330] DEBUG -- : GiftImage Load (0.4ms) SELECT "gift_images".* FROM "gift_images" WHERE "gift_images"."gift_id" = $1 [["gift_id", 20]]
I, [2018-02-09T17:04:12.107604 #32330] INFO -- : Rendered /home/salute_api/staging/shared/bundle/ruby/2.2.0/gems/rails_admin-0.8.1/app/views/rails_admin/main/_delete_notice.html.haml (35.7ms)
I, [2018-02-09T17:04:12.108914 #32330] INFO -- : Rendered /home/salute_api/staging/shared/bundle/ruby/2.2.0/gems/rails_admin-0.8.1/app/views/rails_admin/main/delete.html.haml within layouts/rails_admin/pjax (44.0ms)
I, [2018-02-09T17:04:12.117801 #32330] INFO -- : Compl
deployer@cs24702:~/salute/log$ grep 'DELETE FROM \"gift_images\"' -Ri staging.log -B 5 -A 5
D, [2018-02-09T17:04:13.901078 #32330] DEBUG -- : Gift Load (0.5ms) SELECT "gifts".* FROM "gifts" WHERE "gifts"."id" = $1 ORDER BY "gifts"."id" ASC LIMIT 1 [["id", 20]]
D, [2018-02-09T17:04:13.902601 #32330] DEBUG -- : (0.2ms) BEGIN
D, [2018-02-09T17:04:13.903529 #32330] DEBUG -- : AdminsGift Load (0.4ms) SELECT "admins_gifts".* FROM "admins_gifts" WHERE "admins_gifts"."gift_id" = $1 [["gift_id", 20]]
D, [2018-02-09T17:04:13.904884 #32330] DEBUG -- : SQL (0.4ms) DELETE FROM "admins_gifts" WHERE "admins_gifts"."id" = $1 [["id", 2]]
D, [2018-02-09T17:04:13.905658 #32330] DEBUG -- : GiftImage Load (0.3ms) SELECT "gift_images".* FROM "gift_images" WHERE "gift_images"."gift_id" = $1 [["gift_id", 20]]
D, [2018-02-09T17:04:13.906892 #32330] DEBUG -- : SQL (0.4ms) DELETE FROM "gift_images" WHERE "gift_images"."id" = $1 [["id", 12]]
D, [2018-02-09T17:04:13.907521 #32330] DEBUG -- : SQL (0.3ms) DELET
@dongalor
dongalor / ID.js
Created January 23, 2018 16:39
ID - a unique ID/name generator for JavaScript
// Generate unique IDs for use as pseudo-private/protected names.
// Similar in concept to
// <http://wiki.ecmascript.org/doku.php?id=strawman:names>.
//
// The goals of this function are twofold:
//
// * Provide a way to generate a string guaranteed to be unique when compared
// to other strings generated by this function.
// * Make the string complex enough that it is highly unlikely to be
// accidentally duplicated by hand (this is key if you're using `ID`
Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad request (400)" UserInfo={NSLocalizedDescription=Request failed: bad request (400), NSErrorFailingURLKey=https://jamfabric.ru/parse/functions/getTags, com.alamofire.serialization.response.error.data=<7b22636f 6465223a 3230392c 22657272 6f72223a 22696e76 616c6964 20736573 73696f6e 20746f6b 656e227d>, com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x1c42232e0> { URL: https://jamfabric.ru/parse/functions/getTags } { Status Code: 400, Headers {
"Access-Control-Allow-Headers" = (
"X-Parse-Master-Key, X-Parse-REST-API-Key, X-Parse-Javascript-Key, X-Parse-Application-Id, X-Parse-Client-Version, X-Parse-Session-Token, X-Requested-With, X-Parse-Revocable-Session, Content-Type"
);
"Access-Control-Allow-Methods" = (
"GET,PUT,POST,DELETE,OPTIONS"
);
"Access-Control-Allow-Origin" = (
"*"
);
Parse.Cloud.define('trueCurrent', function (req, res) {
User.loginByToken(req.params.sessionToken)
var currentUser = Parse.User.current();
res.success(currentUser);
});