Skip to content

Instantly share code, notes, and snippets.

@bsalex
bsalex / .block
Created May 17, 2021 15:46 — forked from kevinlin1/.block
k-d Tree Visualization
license: cc-by-4.0
height: 500
scrolling: no
border: no
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@bsalex
bsalex / class-virtualthemedpage-bc.php
Created March 6, 2019 01:17 — forked from brianoz/class-virtualthemedpage-bc.php
WordPress Virtual page with theme
<?php
/*
* Virtual Themed Page class
*
* This class implements virtual pages for a plugin.
*
* It is designed to be included then called for each part of the plugin
* that wants virtual pages.
*
* It supports multiple virtual pages and content generation functions.
@bsalex
bsalex / Controller.php
Created March 6, 2019 01:12 — forked from gmazzap/Controller.php
WordPress plugin to ease the creation of virtual pages.
<?php
namespace GM\VirtualPages;
/**
* @author Giuseppe Mazzapica <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
*/
class Controller implements ControllerInterface {
private $pages;
@bsalex
bsalex / README.md
Created February 6, 2019 13:36 — forked from stalniy/README.md
Завдання для Frontend девелопера

Frontend Тестове Завдання

Написати компонент, що може створювати форму з динамічними правилами валідації на базі заданого конфігураційного об’єкта. Об’єкт має наступний вигляд:

{
  code: 'Person',
  attributes: [
    {
@bsalex
bsalex / dabblet.css
Last active August 12, 2016 08:44
Untitled
.outer {
width: 500px;
height: 500px;
background-color: #88CCFF;
}
.limited {
width: 200px;
min-height: 50%;
max-height: 70%;
@bsalex
bsalex / .fonts.conf
Created March 19, 2016 21:12 — forked from dcrystalj/.fonts.conf
Updated version of the fonts.conf file mentioned in http://www.binarytides.com/gorgeous-looking-fonts-ubuntu-linux/ in order to get rid of most of the fontconfig warnings (mostly the "Having multiple values in <test> isn't supported and may not work as expected")
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@bsalex
bsalex / index.js
Last active December 14, 2015 00:43
Creates/Overrides object prop based on existing object props
R.converge(
R.assoc('x'),
[
R.compose(
R.inc, R.prop('y')
),
R.identity
]
)({x:1, y:4})
@bsalex
bsalex / .babelrc
Created October 30, 2015 19:14 — forked from joshq00/.babelrc
Babel 6 : React / stage 0
{
"presets": [ "react", "es2015" ],
"plugins": [
"transform-es2015-modules-commonjs",
"transform-react-constant-elements"
]
}
@bsalex
bsalex / states.rb
Last active August 27, 2015 09:41 — forked from dblandin/states.rb
Ruby array of US state name and abbreviations
states = Array[ ["AK", "Alaska"],
["AL", "Alabama"],
["AR", "Arkansas"],
["AS", "American Samoa"],
["AZ", "Arizona"],
["CA", "California"],
["CO", "Colorado"],
["CT", "Connecticut"],
["DC", "District of Columbia"],
["DE", "Delaware"],