Skip to content

Instantly share code, notes, and snippets.

View oleg-py's full-sized avatar
😎
JS survivor

Oleg Pyzhcov oleg-py

😎
JS survivor
View GitHub Profile
@oleg-py
oleg-py / BUUL_NoLegion.ovr
Created September 28, 2019 06:42
MGE static overrides for base MW stronghold, ghostfence, BUUL buildings, RoHT strongholds
[names]
uvi_Twin_doorway=enable
uvi_Twin_hammock=enable
uvi_Twin_bedroll=enable
uvi_inn_4_signpost=enable
uvi_Inn_4_banner=enable
uvi_Tinker_1_bigroot=enable
uvi_Tinker_bannerd=enable
uvi_Tinker_1_podbud_02=enable
uvi_Tinker_2_housepod_03=enable
@oleg-py
oleg-py / build.sbt
Created April 19, 2019 06:22
sbt-idea-plugin - can't run IJ
val pluginName = "catnip-intellij"
lazy val catnipIntellij = project.in(file("."))
.enablePlugins(SbtIdeaPlugin)
.settings(
name := pluginName,
ThisBuild / version := "0.1",
ThisBuild / scalaVersion := "2.12.8",
ThisBuild / ideaPluginName := pluginName,
ThisBuild / ideaBuild := "191.6707.31",
@oleg-py
oleg-py / autolenses.scala
Created April 15, 2018 13:02
Automatic generation of lenses and MonadState instances based on 'em
import cats.Monad
import cats.data.StateT
import cats.effect._
import cats.implicits._
import cats.mtl._
import cats.mtl.implicits._
import shapeless._
import scala.language.higherKinds
case class Health(num: Int)
@oleg-py
oleg-py / shapelyref.scala
Created April 7, 2018 13:56
Combining Ref-like type with shapeless
import cats._
import implicits._
import shapeless._
import tag._
import scala.language.dynamics
import cats.effect.IO
trait Var[F[_], A] extends Dynamic { outer =>
@oleg-py
oleg-py / aliBulkCancel.js
Created July 4, 2017 17:45
AliExpress: cancelling all orders on the page
// Untested after refactoring
function aliBulkCancel () {
const cancelBody = oid => {
const fd = new FormData()
fd.append(`_csrf_token`, document.querySelector('input[name*=csrf]').value)
fd.append(`action`, "cancelOrder/cancel_order_action")
fd.append(`event_submit_do_buyer_request`, "anything")
fd.append(`order_id`, oid)
fd.append("_fm.ca._0.r", "buyerCannotPayment")
return fd
import cats.SemigroupK
import cats._
import cats.syntax.all._
import cats.instances.option._
import org.scalacheck.Arbitrary._
import cats.laws.discipline.SemigroupKTests
implicit val semigroupByLongest = new SemigroupK[List] {
override def combineK[A](x: List[A], y: List[A]): List[A] =
x.map(_.some).zipAll(y.map(_.some), none[A], none[A])
@oleg-py
oleg-py / ff_orbs_catlinks.css
Last active August 29, 2015 14:14
Orbs category panel
@oleg-py
oleg-py / alpha_topbar_redux.css
Created August 3, 2014 04:14
Topbar Redux for MAL lists
#mal_control_strip {background-color: transparent !important;background-image: url('http://s017.radikal.ru/i425/1203/8e/8a32093af242.png') !important;position:fixed;top: 0;}
#mal_control_strip td {height: 24px !important; border-right-color: rgba(0,0,0,0.8) !important;}
#mal_control_strip div {display:inline}
#mal_cs_pic img {height: 24px !important; width: auto !important}
#mal_cs_listinfo {width: auto !important}
#mal_cs_listinfo div:first-of-type:before {content:'Logged in as '}
#mal_cs_listinfo div:last-of-type a {text-decoration: none}
#mal_cs_listinfo div:last-of-type a:hover {text-decoration: underline}
#mal_cs_listinfo div:last-of-type:before {font-weight:normal;content:'('}
#mal_cs_listinfo div:last-of-type:after {font-weight:normal;content:')'}
@oleg-py
oleg-py / alpha_geometry.css
Created August 3, 2014 04:09
Geometry CSS for Alpha Layout
body {
background-attachment:fixed;
background-color: #000;
background-repeat: no-repeat;
font-family: 'Segoe UI', 'Century Gothic', sans-serif;
font-size: 11px;
background-size: cover;
-moz-background-size: cover;
}