Skip to content

Instantly share code, notes, and snippets.

View ivanmem's full-sized avatar
🏠
Working from home

Ivan M ivanmem

🏠
Working from home
View GitHub Profile
@ivanmem
ivanmem / LongPool User
Created September 8, 2019 19:26
LongPoolUser.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using VkNet.Abstractions;
using VkNet.Exception;
using VkNet.Model;using VkNet.Model.RequestParams;
namespace ProjectName
@ivanmem
ivanmem / LongPoolGroup.cs
Last active February 14, 2020 20:24
LongPoolGroup.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using VkNet.Abstractions;
using VkNet.Exception;
using VkNet.Model;
using VkNet.Model.GroupUpdate;
const b = document.getElementsByClassName("nim-dialog--close _im_dialog_close");
for(let _b of b) {
_b.click()
}
const fTemp = document.getElementsByClassName("flat_button");
const f = [];
for(_f of fTemp) {
if(_f.innerHTML !="Удалить" && _f.innerHTML !="Выйти из беседы") {
console.log(_f)
} else {
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using VkNet.Abstractions;
using VkNet.Exception;
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'VkNet.Model.VideoImage' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path 'image[4]', line 21, position 5.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList
@ivanmem
ivanmem / vkfixzoomimg.css
Last active August 7, 2022 14:34
vk fix zoom images windows 125, 150, 175, 200%
[dir] #pv_photo {
display: flex;
align-items: center;
}
[dir] #pv_photo img {
max-width: 100%;
max-height: 100%;
width: auto !important;
height: auto !important;
}
@ivanmem
ivanmem / safebooru-open-image-right-click.js
Last active November 26, 2022 22:27
tampermonkey script for safebooru.org to open the original image by right-clicking
// ==UserScript==
// @name safebooru-open-image-right-click
// @version 0.1
// @description script for safebooru.org to open the original image by right-clicking
// @author github.com/xeleoss
// @match *://safebooru.org/index.php*
// @icon https://www.google.com/s2/favicons?sz=64&domain=safebooru.org
// @run-at document-end
// @updateUrl https://gist.github.com/xeleoss/812b182d4f2543bff9a26b2fb512cba8
// ==/UserScript==
@ivanmem
ivanmem / booru-load-original-images.user.js
Last active December 4, 2022 23:02
tampermonkey script for [name]booru.org to load the original size image instead of preview
// ==UserScript==
// @name booru-load-original-images
// @namespace https://gist.github.com/xeleoss/07d9f38a6762e468d7abbf863e5f549e
// @version 0.2
// @description script for (safe|gel|dan)booru.org to load the original size image instead of preview
// @author github.com/xeleoss
// @match *://safebooru.org/index.php*
// @match *://gelbooru.com/index.php*
// @match *://danbooru.donmai.us/posts*
// @icon https://www.google.com/s2/favicons?sz=64&domain=safebooru.org
@ivanmem
ivanmem / safe-and-gel-booru-switching-pages-arrows.user.js
Last active November 27, 2022 00:59
script for (safe|gel)booru.org to switching pages with keyboard arrows
// ==UserScript==
// @name safe-and-gel-booru-switching-pages-arrows
// @namespace https://gist.github.com/xeleoss/cca13f846081b883863606f2009f817e
// @version 0.1
// @description script for (safe|gel)booru.org to switching pages with keyboard arrows
// @author github.com/xeleoss
// @match *://safebooru.org/index.php*
// @match *://gelbooru.com/index.php*
// @icon https://www.google.com/s2/favicons?sz=64&domain=safebooru.org
// @run-at document-end
// ==UserScript==
// @name coub-fullscreen-key-f
// @version 0.1
// @description Добавляет быструю клавишу F для переключения полноэкранного режима
// @author github.com/xeleoss
// @match *://coub.com*
// @match *://coub.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=coub.com
// @run-at document-end
// ==/UserScript==