Skip to content

Instantly share code, notes, and snippets.

View konstantinos-tsatsarounos's full-sized avatar
🏠
Working from home

Konstantinos Tsatsarounos konstantinos-tsatsarounos

🏠
Working from home
View GitHub Profile
@konstantinos-tsatsarounos
konstantinos-tsatsarounos / home.php
Last active November 21, 2020 10:17
Simple template loop with PHP
<?php
/**
* My home file
*/
$test_data = [
[
'title' => 'hello world',
'paragraphs' => [
'Candy canes gingerbread soufflé. Danish powder donut marshmallow candy cheesecake. Jelly beans cake dessert apple pie lemon drops. Jujubes sugar plum danish ice cream. Dessert soufflé oat cake. Caramels bonbon marzipan fruitcake gummies toffee. Liquorice chocolate cake sweet roll danish brownie pie icing gingerbread. Powder tootsie roll liquorice caramels brownie pudding cake. Icing gummi bears powder tootsie roll icing. Soufflé muffin cake. Gummies chocolate cake jelly beans. Croissant wafer fruitcake tootsie roll biscuit.',
@konstantinos-tsatsarounos
konstantinos-tsatsarounos / ls_colors
Created June 11, 2018 19:14 — forked from jmoz/ls_colors
ls_colors file to change colour of ls
# di=5;34;43 Setting the LS_COLORS di parameter to the above example will make directories appear in flashing blue text with an orange background
#0 = Default Colour
#1 = Bold
#4 = Underlined
#5 = Flashing Text
#7 = Reverse Field
#31 = Red
#32 = Green
#33 = Orange
#34 = Blue
@konstantinos-tsatsarounos
konstantinos-tsatsarounos / clock.ts
Last active December 16, 2017 21:58
Simple Clock With Typescript
/**
* Creates a basic clock and binds it to a specified element
*/
class Clock {
timeTemplate: string = "00:00:00";
clockHandler: number;
target: HTMLElement;
/**
* @return string, time
function pressSpace(target, type) {
var press = new KeyboardEvent(type, {"keyCode": 32});
if(type == 'keyup'){ target.value += ' ';}
target.dispatchEvent(press);
}
function type(){
var text = document.getElementById('words');
var currentword = document.getElementById('currentword');
function pressSpace(target, type) {
var press = new KeyboardEvent(type, {"keyCode": 32});
if(type == 'keyup'){ target.value += ' ';}
target.dispatchEvent(press);
}
function type(){
var text = document.getElementById('words');
var currentword = document.getElementById('currentword');
@konstantinos-tsatsarounos
konstantinos-tsatsarounos / Insertion sort.php
Created May 19, 2016 23:52
Insertion sort algorithm for php
function shortNumbers(array $numbers){
$counter = 1;
for(;$counter < count($numbers); $counter++){
$x = $numbers[$counter];
$j = $counter - 1;
while ( $j>=0 && $numbers[$j] > $x ){
$numbers[$j + 1] = $numbers[$j];
$j--;
}
@konstantinos-tsatsarounos
konstantinos-tsatsarounos / style.css
Last active February 7, 2016 20:19
Text word counter
html {
font-size: 16px;
font-family: sans-serif;
}
button {
border: none;
background: royalblue;
padding: 1em 2em;
margin: .5em 0;
__author__ = 'Konstantinos Tsatsarounos'
import time;
greeting = "hello";
# a simple print func
def console(str):
print(str);