Skip to content

Instantly share code, notes, and snippets.

@vasilake-v
vasilake-v / spotify-mute-on-ads.js
Last active March 2, 2023 13:38
*Tampermonkey script running on spotify app tab* It mutes the player when the "Advertisment" kicks-in, and once Ads are over it un-mutes the player back
// ==UserScript==
// @name Spotify-Mute-on-Ads
// @namespace http://tampermonkey.net/
// @version 0.1
// @description It mutes the player when the "Advertisment" kicks-in, and once Ads are over it un-mutes the player back
// @author Vasilake.sven
// @match https://open.spotify.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=spotify.com
// @grant none
// ==/UserScript==
@vasilake-v
vasilake-v / Unicode table
Created September 25, 2021 09:30 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:
@vasilake-v
vasilake-v / defaultController.php
Created September 30, 2019 15:14
Define doctrine sql query logger
<?php
class myController extends Controller
{
public function indexAction()
{
// Start setup logger
$doctrine = $this->getDoctrine();
$doctrineConnection = $doctrine->getConnection();
$stack = new \Doctrine\DBAL\Logging\DebugStack();
<?php
trait singletone
{
static function getInstance() {
static $instance;
if ($instance === null){
$instance = new self();
}
@vasilake-v
vasilake-v / checkip.sh
Created July 4, 2018 07:27
Bash script that checks if current ip has changed. If it did change, send new ip on email address
#!/bin/sh
cd ~/scripts
LAST_IP_FILENAME="./last_known_ip"
MY_EMAIL_ADDRESS="xyz@xyz.com"
LAST_IP=""
#CURRENT_IP=`/sbin/ifconfig | awk '/enp3s0/{getline; split($2, result, ":"); print result[2]; }'`
CURRENT_IP=`/sbin/ifconfig | awk '/enp3s0/{getline; print $2; }'`
if [ -f "$LAST_IP_FILENAME" ]; then
LAST_IP=`cat $LAST_IP_FILENAME`;
@vasilake-v
vasilake-v / Chainable.php
Created June 28, 2018 09:28
Class that allows to initialize a object like with a builder factory that will fill in new object property values.
<?php
/**
* Created by PhpStorm.
* User: Veaceslav Vasilache <veaceslav.vasilache@gmail.com>
* Date: 6/14/18
* Time: 1:14 PM
*/
namespace TinAppBundle\Infrastructure;
@vasilake-v
vasilake-v / plugin.js
Created May 12, 2014 14:46
Fix on "ckeditor-track-changes" plugin
// Line: 103
ed.on("destroy", (function(editor) {
var ind = this._findPluginIndex(editor);
var ind = _findPluginIndex(editor.editor);
if (ind >= 0) {
if (_pluginMap[ind].plugin._tracker) {
_pluginMap[ind].plugin._tracker.stopTracking(true);
jQuery(_pluginMap[ind].plugin._tracker).unbind();
_pluginMap[ind].plugin._tracker = null;
}