Skip to content

Instantly share code, notes, and snippets.

Dominik Tomasi dtomasi

Block or report user

Report or block dtomasi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dtomasi
dtomasi / default
Last active Jan 26, 2020
Brew Nginx PHP7
View default
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@dtomasi
dtomasi / StickyNav.js
Last active Aug 31, 2018
StickNav pins navigation-bars to the top if scrolling over it.
View StickyNav.js
/**
* jQuery Plugin StickyNav
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 09.10.13
*/
(function ($) {
@dtomasi
dtomasi / getUrlsFromChildren.js
Last active Aug 31, 2018
get all urls from all children of element
View getUrlsFromChildren.js
/**
* Plugin for Loading urls eg. href-attribute from children of an Element
* may be to get all Links from a Navigation
*
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 09.10.13
*
*/
@dtomasi
dtomasi / getObjectLenght.js
Last active Aug 31, 2018
get length on an Object
View getObjectLenght.js
/**
* Global function for Counting length of an Object
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 09.10.13
*/
(function($,window){
$.fn.objectLength = function(){
@dtomasi
dtomasi / Timer.php
Last active Aug 31, 2018
Timer-Class for Testing speed of PHP-Scripts or find speed brake
View Timer.php
<?php
/**
* Timer vor Testing PHP-Scripts
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 09.12.13
*
* usage:
* Timer::start();
@dtomasi
dtomasi / Vererbung.js
Created Jan 10, 2014
Vorlage für einen Klassenaufbau in Javascript
View Vererbung.js
/**
* Vorlage für Klassenaufbau mit Vererbung in Javascript
* @constructor
*/
/**
* Define Class ParentClass
* @constructor
*/
function ParentClass() {
View ToolTipPlugin.js
/**
* jQuery Plugin ToolTip
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 27.12.13
*/
var ToolTipPlugin = {
@dtomasi
dtomasi / ContentLoader.js
Last active Aug 31, 2018
ContentLoader loads HTML from given UrlObject via Ajax. It returns all data via complete-Function if all ist recieved. onlyContainer-Option allows to fetch a specified Element from Url eg. returns only specified element.
View ContentLoader.js
/**
* JQuery Plugin ContentLoader
* @copyright tomasiMEDIA 2013
* @author Dominik Tomasi
* @date 09.10.13
*/
(function($,window){
$.ContentLoader.defaultOptions = {
@dtomasi
dtomasi / clone-hdd.sh
Last active Aug 31, 2018
Backup and Restore HDD Linux
View clone-hdd.sh
## Create disk image
##
## 1. Boot from a liveCD or liveUSB.
## 2. Make sure no partitions are mounted from the source hard drive.
## 3. Mount the external HD
## 4. Backup the drive.
dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c > /mnt/sda1/hda.img.gz
## Restore the Disk
@dtomasi
dtomasi / dateHelpers.js
Last active Aug 31, 2018
Set of Date-Helper-Functions
View dateHelpers.js
/**
* Get the last full our of given date or now
*/
function getPrevFullHour(date) {
if (!date) {
date = new Date();
}
var copiedDate = new Date(date);
copiedDate.setMinutes(0);
You can’t perform that action at this time.