Skip to content

Instantly share code, notes, and snippets.

View pebsconsulting's full-sized avatar

Georgi Tsochev pebsconsulting

  • PEBS-Management Consulting LTD
  • Sofia
View GitHub Profile
D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.
Download the latest version (4.7.3) here:
d3.zip
To link directly to the latest release, copy this snippet:
<script src="https://d3js.org/d3.v4.min.js"></script>

Scala is a wonderful language, with a specification of a size comparable with that of Java. Overall, the specification is simpler than C++. Why then do some feel intimidated by its expressiveness?

Scala can generate complex constructs. There are some features of the language that, if not used properly, can negatively influence one's perception of its simplicity and generate a waste of many an hour of a frustrated developer.

Newcomers from simply typed, object-oriented, structured languages do not have a full grasp of all the features of scala and their effects or benefits, and they may be very surprised if others on their team use them.

One thing to have when starting or using scala is a readily available bible. I recommend "Programming in Scala", the .pdf version, an easily searcheable language reference.

The scala style guide is very good. Here we will describe the advanced features of the language, which are aimed at library-developers and should not b

@pebsconsulting
pebsconsulting / _icons.scss
Created March 29, 2017 00:29 — forked from chriseppstein/_icons.scss
This is an example of the generated stylesheet by compass for a set of sprites
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$icon-sprite-base-class: ".icon-sprite" !default;
$icon-sprite-dimensions: false !default;
$icon-position: 0% !default;
$icon-spacing: 0 !default;
$icon-repeat: no-repeat !default;
@pebsconsulting
pebsconsulting / 1_slower_sprite_file.scss
Created March 29, 2017 00:39 — forked from chriseppstein/1_slower_sprite_file.scss
This gist demonstrates how a generated sprite file can be optimized to shave some time off your compile.
@import "compass/utilities/sprites/base";
// General Sprite Defaults
// You can override them before you import this file.
$emblem-sprite-base-class: ".emblem-sprite" !default;
$emblem-sprite-dimensions: false !default;
$emblem-position: 0% !default;
$emblem-spacing: 0 !default;
$emblem-repeat: no-repeat !default;
@pebsconsulting
pebsconsulting / question.md
Created April 16, 2017 19:09 — forked from rubenrivera/question.md
Question - Answer from Web Applications [Show URL used to edit responses from a Google Form in a Google Spreadsheet by using a script](http://webapps.stackexchange.com/q/89551/88163)

Revision 3 http://webapps.stackexchange.com/revisions/89551/3

Show URL used to edit responses from a Google Form in a Google Spreadsheet by using a script

I'm trying to make the edit URL for a Google Form automatically populate in the response Google Sheet that it's attached to. I've seen this already and want to use it, but I'm having issues trying to figure out where exactly to put the script.

I've tried putting it in the script editor in the Google Spreadsheet that I would like the URL to appear in, but I'm not sure where to go from there. In the script editor I've tried to test it as an add-on but that didn't end up working.

I have little experience with scripts and the script editor in Google Sheets. As a final note I am using one other add-on called AutoCrat in the same Google Spreadsheet.

@pebsconsulting
pebsconsulting / flask_server.py
Created May 1, 2017 03:21 — forked from tschieggm/flask_server.py
Stackdriver webhook server example
import string
import sys
import logging
import json
from flask import Flask
from flask import Response, request
logger = logging.getLogger(__name__)
logger.info("Stackdriver webhook-sample starting up on %s" % (string.replace(sys.version, '\n', ' ')))
@pebsconsulting
pebsconsulting / filter-proxy.php
Created May 2, 2017 10:07 — forked from robertuniqid/filter-proxy.php
Easily attach filters in WordPress, then remove them.
<?php
// This is an PHP Trait http://php.net/manual/ro/language.oop5.traits.php
trait FilterProxy {
protected $_filter_proxy_storage = [];
public function _filter_proxy_setup( $information ) {
if( empty( $information ) )
@pebsconsulting
pebsconsulting / pod-schema-v1.1-draft-example.json
Created May 16, 2017 12:16 — forked from philipashlock/pod-schema-v1.1-draft-example.json
Project Open Data schema example - v1.1 draft
{
"@context": "https://project-open-data.cio.gov/v1.1/schema/catalog.jsonld",
"@id": "http://www.agency.gov/data.json",
"@type": "dcat:Catalog",
"conformsTo": "https://project-open-data.cio.gov/v1.1/schema",
"describedBy": "https://project-open-data.cio.gov/v1.1/schema/catalog.json",
"dataset": [
{
"@type": "dcat:Dataset",
"accessLevel": "public",
@pebsconsulting
pebsconsulting / WP_Cleanup.php
Created May 17, 2017 23:10 — forked from dimobelov/WP_Cleanup.php
Функции за почистване на Wordpress от ненужна информация
<?php
/**
* Remove meta name=generator
*/
public function remove_wp_version() {
remove_action( 'wp_head', 'wp_generator' );
add_filter( 'revslider_meta_generator', array( $this, 'remove_revslider_metadata' ) );
$this->remove_visual_composer_metadata();
@pebsconsulting
pebsconsulting / example.php
Created June 15, 2017 05:39 — forked from bueltge/example.php
Example to use the taxonomie Dropdown for Customizer, the classes are inside the project: https://github.com/bueltge/Wordpress-Theme-Customizer-Custom-Controls
<?php
/**
* @see: https://github.com/bueltge/Wordpress-Theme-Customizer-Custom-Controls
*/
add_action( 'customize_register', 'fb_customize_register' );
function fb_customize_register( $wp_customize ) {
require_once( 'class-taxonomy_dropdown_custom_control.php' );
$wp_customize->add_section(