Skip to content

Instantly share code, notes, and snippets.

View l3dlp's full-sized avatar
🎯
go+wasm revives me ✔️

L3DLP labs l3dlp

🎯
go+wasm revives me ✔️
View GitHub Profile
@l3dlp
l3dlp / vcard2qrcode.pl
Created October 26, 2017 16:05 — forked from adulau/vcard2qrcode.pl
VCARD to QRcode
#!/usr/bin/perl
#
use GD::Barcode::QRcode;
open(X, ">./out.png");
binmode(X);
my $vcard = "
BEGIN:VCARD
N:Lastname;Firstname
@l3dlp
l3dlp / vcard2qrcode.pl
Created October 26, 2017 16:05 — forked from adulau/vcard2qrcode.pl
VCARD to QRcode
#!/usr/bin/perl
#
use GD::Barcode::QRcode;
open(X, ">./out.png");
binmode(X);
my $vcard = "
BEGIN:VCARD
N:Lastname;Firstname
@l3dlp
l3dlp / OrbitControls.js
Created May 13, 2018 17:36 — forked from mrflix/OrbitControls.js
Three.OrbitControls for multiple instances on a page.Usage: controls = new THREE.OrbitControls(camera, document, renderer.domElement); Based on: http://threejs.org/examples/js/controls/OrbitControls.js
/**
* @author qiao / https://github.com/qiao
* @author mrdoob / http://mrdoob.com
* @author alteredq / http://alteredqualia.com/
* @author WestLangley / http://github.com/WestLangley
* @author erich666 / http://erichaines.com
* @author mrflix / http://felixniklas.de
*
* released under MIT License (MIT)
*/
@l3dlp
l3dlp / PSR-0-final-proposal.md
Last active May 15, 2018 20:13 — forked from Thinkscape/PSR-0-final-proposal.md
PSR-0 Final Proposal (PHP Standards Working Group)

PSR-0 Final Proposal (PHP Standards Working Group)

The following describes the mandatory requirements that must be adhered to for autoloader interoperability.

Mandatory:

  • A fully-qualified namespace and class must have the following structure \ <Vendor Name> \ (<Namespace>)* \ <Class Name>
  • Each namespace must have a top-level namespace ("Vendor Name").
  • Each namespace can have as many sub-namespaces as it wishes.
  • Each namespace separator is converted to a DIRECTORY_SEPARATOR when loading from the file system.
  • Each "_" character in the CLASS NAME is converted to a DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.
@l3dlp
l3dlp / SplClassLoader.php
Last active May 15, 2018 20:16 — forked from jwage/SplClassLoader.php
The following gist is a sample SplClassLoader implementation that can load your classes if you follow the autoloader interoperability standards proposed above. It is the current recommended way to load PHP 5.3 classes that follow these standards. PSR-0 Final Proposal: https://gist.github.com/l3dlp/34b15f3a1df2b899c3588f4e5d71cc96
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@l3dlp
l3dlp / rss_reader.php
Created September 10, 2018 08:59 — forked from mburst/rss_reader.php
RSS Feed Reader in PHP
<html>
<head>
<title>RSS Feed Reader</title>
</head>
<body>
<?php
//Feed URLs
$feeds = array(
"http://maxburstein.com/rss",
"http://www.engadget.com/rss.xml",
@l3dlp
l3dlp / caddy-debian-9-sysd-service-file
Created September 15, 2018 17:42 — forked from neilstuartcraig/caddy-debian-9-sysd-service-file
A basic Caddy / Debian 9 (Stretch) System D service file
[Unit]
Description=Caddy HTTP/2 web server
Documentation=https://caddyserver.com/docs
After=network-online.target
Wants=network-online.target
[Service]
Restart=on-failure
StartLimitInterval=0
StartLimitBurst=0
@l3dlp
l3dlp / app.js
Created October 14, 2018 21:52 — forked from stl-od/app.js
An offline form experiment
$.fn.serializeObject = function()
{
var o = {};
var a = this.serializeArray();
$.each(a, function() {
if (o[this.name] !== undefined) {
if (!o[this.name].push) {
o[this.name] = [o[this.name]];
}
o[this.name].push(this.value || '');
@l3dlp
l3dlp / .gitignore
Last active November 8, 2018 21:09 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# PHP source #
@l3dlp
l3dlp / example.html
Created May 17, 2019 17:03 — forked from kylebarrow/example.html
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>