Skip to content

Instantly share code, notes, and snippets.

View DoRightt's full-sized avatar

Anton Sukhov DoRightt

  • Rovergulf.net
  • The Milky Way
View GitHub Profile
@DoRightt
DoRightt / newPluginStr
Created May 25, 2017 08:29
newPluginStructure
$.fn.myNewPlugin = function() {
return this.each(function() {
})
}
@DoRightt
DoRightt / preloader by agragregra
Created August 13, 2017 07:31
preloader by agragregra
#loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
@DoRightt
DoRightt / WordPress query_post
Last active June 10, 2020 10:03
gist by agragregra
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) : the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
<?php the_post_thumbnail(array(100, 100)); ?>
<?php endwhile; endif; wp_reset_query(); ?>
class Singletone {
private uniqueInstance: Singletone;
name = "vasya";
private constructor() {}
public static getInstance() {
if (this.uniqueInstance === undefined) {
this.uniqueInstance = new Singletone();
}
return this.uniqueInstance;
abstract class Pizza {
name: string;
dough: Dough;
sauce: Sauce;
veggies: Veggies;
cheese: Cheese;
pepperoni: Pepperoni;
clams: Clams;
toppings: string[] = ["Extra Mozzarella"];
class Pizza {
bake() {}
prepare() {}
box() {}
cut() {}
}
class CheesePizza extends Pizza {}
class PepperoniPizza extends Pizza {}
interface QuackBehavior {
quack(): void;
}
interface FlyBehavior {
fly(): void;
}
class Quack implements QuackBehavior {
quack(): void {
abstract class Beverage {
description: string = "Unknown beverage";
getDescription() {
return this.description;
}
cost(): number {
return 0;
}
interface Command {
execute(): void;
undo(): void;
}
class Light {
room: string;
constructor(room: string) {
this.room = room;
interface Duck {
quack(): void;
fly(): void;
}
interface Turkey {
gobble(): void;
fly(): void;
}