Skip to content

Instantly share code, notes, and snippets.

View deissh's full-sized avatar
👨‍💻
Trying 10k hours

Kirill deissh

👨‍💻
Trying 10k hours
View GitHub Profile
@deissh
deissh / index.html
Last active June 9, 2020 08:53
PouchDB benchmark
<script src="https://cdnjs.cloudflare.com/ajax/libs/Faker/3.1.0/faker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pouchdb/7.2.1/pouchdb.min.js"></script>
<script src="https://github.com/pouchdb/pouchdb/releases/download/7.1.1/pouchdb.find.js"></script>
<script async>
const N = 1e6;
const messages = []
const db = new PouchDB('my_database', {revs_limit: 1});
@deissh
deissh / index.js
Created May 12, 2020 14:01
Пример плагина для слежения за статусом задач
const { Extention } = require('rfwrapper');
const { FileStore } = require('rfwrapper/lib/Extension/store')
class storage extends FileStore {
filename = '/data/rf-ext.json'
constructor () {
super();
}
}
@deissh
deissh / ParallaxEffect.cs
Created January 4, 2020 14:12
Unity 3d Parallax Effect
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.Serialization;
namespace MainMenu
{
[System.Serializable]
public class ParallaxItem
{
@deissh
deissh / DiscordController.cs
Created November 3, 2019 14:50
Unity discord integration
using UnityEngine;
[System.Serializable]
public class DiscordJoinEvent : UnityEngine.Events.UnityEvent<string> { }
[System.Serializable]
public class DiscordSpectateEvent : UnityEngine.Events.UnityEvent<string> { }
[System.Serializable]
public class DiscordJoinRequestEvent : UnityEngine.Events.UnityEvent<DiscordRpc.JoinRequest> { }
$('.video-button').click(function(e) {
var that = $(this);
var href = that.data('href');
that.parents('.video-block').find('iframe').attr('src', href).parent().show();
if (!that.hasClass('active')) {
var saved = $(this).data('id');
var anime_id = $('input[name="page_id"]').val();
$.ajax({
@deissh
deissh / ips.json
Created June 7, 2019 18:57
GCP publick endpoins
{
"asia-east1": "http://104.155.201.52/ping",
"asia-east2": "http://35.220.162.209/ping",
"asia-northeast1": "http://104.198.86.148/ping",
"asia-northeast2": "http://34.97.196.51/ping",
"asia-south1": "http://35.200.186.152/ping",
"asia-southeast1": "http://35.185.179.198/ping",
"australia-southeast1": "http://35.189.6.113/ping",
"europe-north1": "http://35.228.170.201/ping",
"europe-west1": "http://104.199.82.109/ping",
/**
* Angular Light 0.10.12
* (c) 2015 Oleg Nechaev
* Released under the MIT License.
* 2015-11-30, http://angularlight.org/
*/!function(){function e(e){e=e||{};var t=e.globalControllers,n={core:{},controllers:{},filters:{},text:{},apps:{},utils:{},directives:{al:{},bo:{},ctrl:{}},hooks:{directive:[],binding:[]}},r={};n.f$=r,n.utilits=n.utils,n.d=n.directives;var i=function(e,t){var n=e.indexOf(t);n>=0?e.splice(n,1):console.warn("trying to remove not exist item")};!function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,r,i=t?t:0;if(!this)throw new TypeError;if(r=this.length,0===r||i>=r)return-1;for(0>i&&(i=r-Math.abs(i)),n=i;r>n;n++)if(this[n]===e)return n;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),"function"!=typeof String.prototype.trimLeft&&(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")}),r.browser=function(){var e,t=navigator.appName,n=navigator.userAgent.toLowerCase(),r=
@deissh
deissh / alight.min.js
Created January 25, 2019 13:47
v0.10
/**
* Angular Light 0.10.12
* (c) 2015 Oleg Nechaev
* Released under the MIT License.
* 2015-11-30, http://angularlight.org/
*/!function(){function e(e){e=e||{};var t=e.globalControllers,n={core:{},controllers:{},filters:{},text:{},apps:{},utils:{},directives:{al:{},bo:{},ctrl:{}},hooks:{directive:[],binding:[]}},r={};n.f$=r,n.utilits=n.utils,n.d=n.directives;var i=function(e,t){var n=e.indexOf(t);n>=0?e.splice(n,1):console.warn("trying to remove not exist item")};!function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var n,r,i=t?t:0;if(!this)throw new TypeError;if(r=this.length,0===r||i>=r)return-1;for(0>i&&(i=r-Math.abs(i)),n=i;r>n;n++)if(this[n]===e)return n;return-1}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),"function"!=typeof String.prototype.trimLeft&&(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")}),r.browser=function(){var e,t=navigator.appName,n=navigator.userAgent.toLowerCase(),r
import java.awt.*;
public class IHateOnime{
protected Frame frame = new Frame();
public IHateOnime(String title){
frame.setTitle(title);
Panel panel = new Panel();
CheckboxGroup group = new CheckboxGroup();
Checkbox can = new Checkbox("Can", group, true);
@deissh
deissh / main.java
Created September 28, 2018 17:49
Input&Output
import java.io.*;
public class Main {
public static void main(String[] args) {
// try {
// FileInputStream file = new FileInputStream("sample.txt");
// InputStreamReader text = new InputStreamReader(file, "KOI8_R");
// StringBuffer str = new StringBuffer();
// for (int i = 0; i <= 10; i++){