Skip to content

Instantly share code, notes, and snippets.

Avatar

Teo Maragakis teomaragakis

View GitHub Profile
@teomaragakis
teomaragakis / spotihosts
Last active Jan 19, 2021
The hosts file entries to block Spotify audio ad servers.
View spotihosts
127.0.0.1 media-match.com
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 www.googleadservices.com
127.0.0.1 open.spotify.com
127.0.0.1 pagead2.googlesyndication.com
127.0.0.1 desktop.spotify.com
127.0.0.1 googleads.g.doubleclick.net
127.0.0.1 pubads.g.doubleclick.net
127.0.0.1 audio2.spotify.com
127.0.0.1 www.omaze.com
View hc-548.ino
/*
+-----+
+----[PWR]-------------------| USB |--+
| +-----+ |
| GND/RST2 [ ][ ] |
| MOSI2/SCK2 [ ][ ] A5/SCL[ ] | C5
| 5V/MISO2 [ ][ ] A4/SDA[ ] | C4
| AREF[ ] |
| GND[ ] |
| [ ]N/C SCK/13[ ] | B5
View playerController.cpp
using UnityEngine;
using System.Collections;
public class playerController : MonoBehaviour {
private Animator animator;
// Use this for initialization
void Start () { animator = this.GetComponent(); }
// Update is called once per frame
void Update () {
float v = Input.GetAxis("Vertical");
View HC-SR04.ino
/*
+-----+
+----[PWR]-------------------| USB |--+
| +-----+ |
| GND/RST2 [ ][ ] |
| MOSI2/SCK2 [ ][ ] A5/SCL[ ] | C5
| 5V/MISO2 [ ][ ] A4/SDA[ ] | C4
| AREF[ ] |
| GND[ ] |
| [ ]N/C SCK/13[ ] | B5
@teomaragakis
teomaragakis / widgets.less
Created Nov 4, 2014
Bootstrap Extensions
View widgets.less
// Variables
@widget-padding: 10px;
@widget-background-color @whiter;
@widget-text-color: @brand-secondary;
@widget-inverted-background-color: @brand-primary;
@widget-inverted-text-color: @white;
@teomaragakis
teomaragakis / greeklish.php
Last active Aug 19, 2020
A function that transforms greek characters to english (greeklish).
View greeklish.php
<?php
// Based on http://www.freestuff.gr/forums/viewtopic.php?p=194579#194579
function make_greeklish($text) {
$expressions = array(
'/[αΑ][ιίΙΊ]/u' => 'e',
'/[οΟΕε][ιίΙΊ]/u' => 'i',
'/[αΑ][υύΥΎ]([θΘκΚξΞπΠσςΣτTφΡχΧψΨ]|\s|$)/u' => 'af$1',
'/[αΑ][υύΥΎ]/u' => 'av',
'/[εΕ][υύΥΎ]([θΘκΚξΞπΠσςΣτTφΡχΧψΨ]|\s|$)/u' => 'ef$1',
'/[εΕ][υύΥΎ]/u' => 'ev',
@teomaragakis
teomaragakis / wp-menu-separator.php
Last active Dec 26, 2015
A function that adds a separator to the WordPress Dashboard menu. Call add_menu_separator($position) with a number parameter.
View wp-menu-separator.php
<?php
/**
* add_menu_separator function.
*
* A function that lets you add a menu separator on a given menu position.
*
* @access public
* @param mixed $position
* @return void
You can’t perform that action at this time.