Skip to content

Instantly share code, notes, and snippets.

View loonix's full-sized avatar

Daniel Carneiro loonix

  • CADS UK
  • Vila Nova de Gaia, PT
View GitHub Profile
@apgapg
apgapg / date_utils.dart
Last active November 10, 2021 16:03
Get correct ISO DateTime String with offset in Flutter: https://dartpad.dev/84d855e41c0134a34ff8b2cf034ad249
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
void main() {
print(DateUtils.formatISOTime(DateTime.now()));
print(DateUtils.getCurrentISOTimeString());
}
class DateUtils {
@pgundlach
pgundlach / transform-fontawesome.xsl
Created June 27, 2017 19:30
XSL-Transformation of HTML style fontawesome include to a custom tag with code
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all">
<!--
This transformation turns <i class="fa fa-..."></i> into
<fa>&#x...;</fa>
This is useful for the layout files in the speedata Publisher.
https://github.com/speedata/publisher
@isc30
isc30 / install.bash
Last active January 27, 2021 10:38
Raspberry Pi Install PHP7 + Nginx + MySQL + PhpMyAdmin (last versions)
#!/bin/bash
# Thanks to https://gist.github.com/Lewiscowles1986/ce14296e3f5222082dbaa088ca1954f7
if [ "$(whoami)" != "root" ]; then
echo "Run script as ROOT please. (sudo !!)"
exit
fi
echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" > /etc/apt/sources.list.d/stretch.list
echo "APT::Default-Release \"jessie\";" > /etc/apt/apt.conf.d/99-default-release