Skip to content

Instantly share code, notes, and snippets.

View voku's full-sized avatar
:octocat:
There is nothing good unless you do it.

Lars Moelleken voku

:octocat:
There is nothing good unless you do it.
View GitHub Profile
<?php
namespace utilities;
use cms\Logger;
use Exception;
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@voku
voku / digga.sh
Created December 9, 2014 22:30
digga: show dns-settings from a domain e.g. MX, IP
#!/usr/bin/env bash
# -------------------------------------------------------------------
# digga: show dns-settings from a domain e.g. MX, IP
#
# usage: digga moelleken.org
digga()
{
if [ $# -eq 0 ]; then
echo "Usage: digga moelleken.org"
ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠
ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ
㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ
㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠
ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠
ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ
㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰
ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊
ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ
㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ㊠ ߘ㠊ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊠ ߘ㊰ߘ㊰ߘ㊠ ߘ
#* * * * * command to be executed
#- - - - -
#| | | | |
#| | | | +----- day of week (0 - 6) (Sunday=0)
#| | | +------- month (1 - 12)
#| | +--------- day of month (1 - 31)
#| +----------- hour (0 - 23)
#+------------- min (0 - 59)
@voku
voku / input_filter.php
Last active September 27, 2020 06:30
use input filter for php (get, post, get_post, session, cookie)
<?php
//define('SECONDS_IN_A_MINUTE', 60);
//define('SECONDS_IN_A_HOUR', 3600);
//define('SECONDS_IN_A_DAY', 86400);
//define('SECONDS_IN_A_WEEK', 604800);
//define('SECONDS_IN_A_MONTH', 2592000);
//define('SECONDS_IN_A_YEAR', 31536000);
/**
@voku
voku / SassMeister-input.scss
Created November 21, 2014 15:33
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$breakpoints: "25.5em" "32em" "43.5em" "52.5em" "60em";
@for $i from 1 through length($breakpoints) {
$breakpoint: nth($breakpoints, $i);
<?php
use Mockery as m;
class Swift_Bug543Test extends \PHPUnit_Framework_TestCase
{
public $message = '';
public $mailHtmlBody = '';
public function embeddingImages()
@voku
voku / randomstring.php
Last active August 29, 2015 14:09
generate random string via php - used https://packagist.org/packages/voku/portable-utf8 (UTF8::strlen)
<?php
/**
* generate random string
*
* @param string $len length of the random string
* @param string $characters characters string for the random selection
*
* @return string
*/
@voku
voku / sources.list
Created June 21, 2014 00:47
sources.list -> Debian sid - workstation
#############################################################
################### OFFICIAL DEBIAN REPOS ###################
#############################################################
############### UNSTABLBE ###########################
# Debian sid FAQ - http://wiki.debian.org/DebianUnstable#FAQ
deb http://ftp.de.debian.org/debian/ sid main contrib non-free
deb-src http://ftp.de.debian.org/debian/ sid main contrib non-free
@voku
voku / ElementExists.js
Created June 15, 2014 21:14
Check if Element Exists #jquery
if ($('#myElement').length > 0) {
// it exists
}