Skip to content

Instantly share code, notes, and snippets.

View paligiannis's full-sized avatar

Marios Paligiannis paligiannis

View GitHub Profile
# Rename this file to env.sh, it will be kept out of Git.
# So suitable for adding secret keys and such
NODE_ENV="${NODE_ENV:-development}"
DEPLOY_ENV="${DEPLOY_ENV:-production}"
DEBUG="frey:*"
FREY_DOMAIN="localost:3020"
# FREY_ENCRYPTION_SECRET="***"
UPPYSERVER_PORT=3020
UPPY_ENDPOINT="localhost"
@paligiannis
paligiannis / index.html
Created July 17, 2018 10:38
Index.html for accessing the tus.io | uppy-server
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Uppy test</title>
<link href="https://transloadit.edgly.net/releases/uppy/v0.25.2/dist/uppy.min.css" rel="stylesheet">
</head>
<body>
<div id="drag-drop-area"></div>
@paligiannis
paligiannis / outputCSV.php
Created November 20, 2019 11:20 — forked from albofish/outputCSV.php
Laravel Chunk Results to CSV
<?php
/*
* Chunk through result set and output as CSV file in browser.
*/
function outputCSV($columns, $query, $chunkSize = 200) {
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename='export-" . date("YmdHis") . ".csv");
header("Pragma: no-cache");
header("Expires: 0");
@paligiannis
paligiannis / outputCSV.php
Created November 20, 2019 11:20 — forked from albofish/outputCSV.php
Laravel Chunk Results to CSV
<?php
/*
* Chunk through result set and output as CSV file in browser.
*/
function outputCSV($columns, $query, $chunkSize = 200) {
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename='export-" . date("YmdHis") . ".csv");
header("Pragma: no-cache");
header("Expires: 0");
@paligiannis
paligiannis / afm-validator.js
Created February 11, 2020 11:36 — forked from tdoumas/afm-validator.js
Αλγόριθμος ορθότητας ΑΦΜ Greek Tax Registration Number Validation (AFM)
// Greek Tax Registration Number Validation (AFM)
// Αλγόριθμος ορθότητας ΑΦΜ
function validateAFM(afm) {
if (!afm.match(/^\d{9}$/) || afm == '000000000')
return false;
var m = 1, sum = 0;
for (var i = 7; i >= 0; i--) {
m *= 2;
sum += afm.charAt(i) * m;
@paligiannis
paligiannis / bs4-cheatsheet.md
Created January 21, 2021 22:16 — forked from lirenyeo/bs4-cheatsheet.md
Bootstrap 4 Utilities Cheatsheet

Bootstrap 4 Utilities Cheatsheet

Media Queries

1. up

Bootstrap 4 Mixins Compiled into
@include media-breakpoint-up(xs) @media (min-width: 0px)
@include media-breakpoint-up(sm) @media (min-width: 576px)
@include media-breakpoint-up(md) @media (min-width: 768px)
@paligiannis
paligiannis / wait-el.js
Created February 9, 2022 19:07 — forked from chrisjhoughton/wait-el.js
Wait for an element to exist on the page with jQuery
var waitForEl = function(selector, callback) {
if (jQuery(selector).length) {
callback();
} else {
setTimeout(function() {
waitForEl(selector, callback);
}, 100);
}
};

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write

@paligiannis
paligiannis / install.sh
Created March 17, 2024 08:12 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"