Skip to content

Instantly share code, notes, and snippets.

View dkesberg's full-sized avatar

Daniel Kesberg dkesberg

View GitHub Profile
@dkesberg
dkesberg / import-csv.md
Last active March 4, 2020 12:29
import csv data into xls

Excel 2010:

Create new workbook Data > From Text > Select your CSV file In the popup, choose "Delimited" radio button, then click "Next >" Delimiters checkboxes: tick only "Comma" and uncheck the other options, then click "Next >" In the "Data preview", scroll to the far right, then hold shift and click on the last column (this will select all columns). Now in the "Column data format" select the radio button "Text", then click "Finish".

Excel office365: (client version)

@dkesberg
dkesberg / laravel-internal-error-500.md
Last active February 22, 2019 08:13
Laravel Internal Server Error 500

Internal Server Error 500 on Lararvel

Check the following solutions

RewriteBase:

Set the RewriteBase in .htaccess

Permisssions

Check file permissions

sudo chmod -R o+w storage/

$("head").append("<link rel='stylesheet' id='extracss' href='https://cdn.rawgit.com/dkesberg/cc1543b56a8e36964afeb9a3a69f6669/raw/57048e794abdf5f8362a2359c893ea1604759cfd/poe-print.css' type='text/css' />");
body, .container, .content {
background: none !important;
}
.header, .topBar, .botBar, .forumTable tr {
display: none !important;
}
.forumTable tr:first-child,
.forumTable tr:first-child td {
display: block !important;
background: none !important;
@dkesberg
dkesberg / optimize-images.sh
Created April 7, 2017 07:43 — forked from iimos/optimize-images.sh
Script for JPEG images optimization
#! /bin/sh
# Usage 1:
# optimize-images.sh /images/dir
#
# Usage 2:
# cd /images/dir
# optimize-images.sh
EXTENSIONS="jpe?g"
@dkesberg
dkesberg / count-css-rules.js
Last active June 27, 2016 08:22
IE9 css can contain only up to 4095 selectors
// IE9 css can contain only up to 4095 selectors
// source: http://stackoverflow.com/questions/9906794/internet-explorers-css-rules-limits
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
@dkesberg
dkesberg / print_grid.css
Created January 4, 2016 09:31
foundation 5 grid for print media
/*
Foundation 5 Grid for print media
based on: http://foundation.zurb.com/forum/posts/2820-printing-foundation-5
*/
@media print {
.large-1 {
width: 8.33333%;
}
@dkesberg
dkesberg / slice_arrays.php
Created October 20, 2015 14:10
Slice array in equal parts. For example array(10) into 3 parts => array(4), array(3), array(3)
<?php
function slice_equal($source, $columns) {
$count = count($source);
$perColumn = floor($count / $columns);
$overflow = $count % $columns;
// set start values
$sliceOffset = 0;
@dkesberg
dkesberg / responsive-video.css
Created August 31, 2015 15:42
CSS Container to make Youtube/Vimeo Iframe responsive
// Based on http://www.elmastudio.de/programmierung/css/css-tipp-eingebettete-videos-fur-responsive-webdesigns-optimieren/
.elastic-video {
position: relative;
padding-bottom: 55%;
padding-top: 15px;
height: 0;
overflow: hidden;
}
.elastic-video iframe {