Skip to content

Instantly share code, notes, and snippets.

View katheroine's full-sized avatar
🐋
Containerization

Katarzyna Krasińska katheroine

🐋
Containerization
View GitHub Profile
@katheroine
katheroine / name_masking_within_class_hierarchy.rb
Last active April 4, 2023 13:19
Name masking within class hierarchy
#!/usr/bin/ruby2.7
class House
attr_accessor :balcony
def initialize()
@balcony = "#####"
end
def siesta()
@katheroine
katheroine / name_masking_within_class_hierarchy.php
Created March 31, 2023 16:33
Name masking within class hierarchy
#!/usr/bin/php8.1
<?php
class House {
public string $balcony = "#####";
// public function __costruct() {
// $this->balcony = "######";
// }
#!/usr/bin/python3
import unittest
import yaml
import pathlib
import validators
from bs4 import BeautifulSoup
class TestHtmlDocumentMustHave(unittest.TestCase):
@katheroine
katheroine / version_1.php
Last active June 19, 2017 09:14
SJ actions styles comparison
<?php
class Dummy
{
public function action_index()
{
$device_id = $this->_get_read_request_params('device_id');
$device = new Model_DeviceSettings_Device($device_id);
@katheroine
katheroine / sql-snippets.sql
Last active August 29, 2015 14:22
SQL (mainly Postgres dialect) snippets
## Creating and set up the tables
CREATE TABLE subject
(
id INTEGER PRIMARY KEY,
shortname varchar(32) NOT NULL UNIQUE,
fullname varchar(128),
description TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
@katheroine
katheroine / phpunit-demo.php
Created January 10, 2015 10:22
PHPUnit Demo
<?php
class CsvFileIterator implements Iterator
{
protected $file;
protected $key = 0;
protected $current;
public function __construct($file)
{
@katheroine
katheroine / minum_bootstrap.css
Created February 23, 2014 12:20
Minium CSS bootstrap
/*!
* Bootstrap v3.0.0
*
* Copyright 2013 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world by @mdo and @fat.
*/
<?php
/**
* Class places set of items in table with given number of columns.
* Free spaces are properly disposed in table so that they don't contact if it's possible.
*/
class Itemboard {
/**
* States of gaps number and maximal blacks fields number in checkerboard ratio.
<?php
/**
* Class modeling checkerboard.
* Table with boolean values in the cells, alternately true and false.
*/
class Checkerboard {
/**
* Table with indexes of the fields with false value.
@katheroine
katheroine / chessboard.php
Last active January 4, 2016 14:19
Chessboard planner ;)
<?php
$quantity = $argv[1];
$columns = $argv[2];
$rows = ceil($quantity / $columns);
$places = $columns * $rows;
$gaps = array();