Skip to content

Instantly share code, notes, and snippets.

View frank-dspeed's full-sized avatar
🇩🇪
I Engineer

Frank Lemanschik frank-dspeed

🇩🇪
I Engineer
View GitHub Profile
# all php files :: disallow direct access of file
# between <?php and ?>
defined('_JEXEC') or die;
# index.php :: define variable with application
# between <?php and ?>
$app = JFactory::getApplication();
# index.php :: define variable with document
# between <?php and ?>

Solr and Syslog friend again

Configuration file

etc/logging.properties

#
# Licensed to the Apache Software Foundation (ASF) under one or more
@frank-dspeed
frank-dspeed / sed cheatsheet
Created January 19, 2017 22:36 — forked from freewind/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@frank-dspeed
frank-dspeed / docker-cleanup
Created February 21, 2017 23:42 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@frank-dspeed
frank-dspeed / install.sh
Created February 21, 2017 23:42 — 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"
@frank-dspeed
frank-dspeed / client.js
Created May 22, 2017 10:48 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
var source = `var stealTools = require("steal-tools");
stealTools.export({
steal: {
config: __dirname + "/package.json!npm"
},
outputs: {
"+cjs": {},
"+amd": {},
"+global-js": {}
@frank-dspeed
frank-dspeed / app.html
Created November 1, 2017 20:18 — forked from ebidel/app.html
Fast Polymer app loading - optimized for first render, progressively enhanced lazy loading
<!DOCTYPE html>
<html>
<head>
<style>
body.loading #splash {
opacity: 1;
}
#splash {
position: absolute;
top: 0;
@frank-dspeed
frank-dspeed / index.html
Created November 13, 2017 12:51 — forked from anonymous/index.html
JS Bin [add your binffff description] // source https://jsbin.com/saqigileju
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your binffff description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
jjjj
<style id="jsbin-css">
{
"type": "node",
"request": "launch",
"name": "Mocha Tests",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"protocol": "inspector",
"args": [
"-u",
"tdd",
"--timeout",