Skip to content

Instantly share code, notes, and snippets.

View flexchar's full-sized avatar

Lukas Vanagas flexchar

View GitHub Profile
@flexchar
flexchar / index.html
Created November 14, 2019 10:41
List of courses for my exchange at EUC :)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Courses for exchange at EUC</title>
</head>
@flexchar
flexchar / webpTest.vue
Created June 7, 2019 11:57
Example of WebP not working inside <picture> tag
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>WebP Test</title>
<style>
body {
display: flex;
@flexchar
flexchar / helpers.php
Created March 10, 2019 16:22
dd() & dump() helpers for PHP
<?php
@ini_set('display_errors', 1);
function dd(...$any)
{
foreach ($any as $var) {
var_dump($var);
}
die();
@flexchar
flexchar / floatingLabel.ts
Created February 18, 2019 13:29
TypeScript (typed JavaScript) class implementation for toggling floating label classes for form input fields (note that CSS styling is still required)
interface FloatingLabelConstructor {
fieldContainerClass: string;
activeFieldClass: string;
}
class FloatingLabel {
private fields: NodeListOf<HTMLDivElement>;
private className: string;
constructor({ fieldContainerClass, activeFieldClass } = {} as FloatingLabelConstructor) {
@flexchar
flexchar / instagram.ts
Last active June 1, 2019 11:50
Instagram feed component
window.addEventListener(
'DOMContentLoaded',
(): void => {
const container: HTMLDivElement = document.querySelector(
'[data-instagram]'
);
if (!container) {
console.log('No Instagram container found');
return;
#lang plai
(define-type FWAE
[num (n number?)]
[add (lhs FWAE?) (rhs FWAE?)]
[sub (lhs FWAE?) (rhs FWAE?)]
[with (name symbol?) (named-expr FWAE?) (body FWAE?)]
[id (name symbol?)]
[fun (param symbol?) (body FWAE?)]
[app (fun-expr FWAE?) (arg-expr FWAE?)]
@flexchar
flexchar / index.html
Created October 17, 2018 04:46
Pretty index.html placeholder
<!DOCTYPE html>
<html>
<head>
<title>PLACEHOLDER</title>
<link href="https://fonts.googleapis.com/css?family=Mali:200" rel="stylesheet" type="text/css">
<style>
html, body {
height: 100%;
@flexchar
flexchar / resources\lang\en\pagination.php
Created September 24, 2018 10:25
Rich Laravel Bulma Paginator with Localization
<?php
return [
/*
|--------------------------------------------------------------------------
| Pagination Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used by the paginator library to build
@flexchar
flexchar / index.html
Created May 14, 2018 17:53
Light & Clean Web page for title, font safe
<!DOCTYPE html>
<html>
<head>
<title>{text_here}</title>
<style>
html, body {
height: 100%;
}
body {
margin: 0;
@flexchar
flexchar / timetable.vue
Created March 26, 2018 17:15
Timetable.vue - VueJS component foundation for generating timetable slots
<template>
<div>
<h2>Timetable Generator</h2>
<div class="bar">
<input type="text" placeholder="start" v-model="startTime" />
<input type="text" placeholder="end" v-model="endTime" />
<input type="text" placeholder="length" v-model="length" />
<input type="number" placeholder="number" v-model="slots" />