Skip to content

Instantly share code, notes, and snippets.

View konstantindenerz's full-sized avatar

Konstantin Denerz konstantindenerz

View GitHub Profile
@konstantindenerz
konstantindenerz / prepare-commit-msg
Last active May 14, 2020 05:02
Use git hook to assign issue from branch name to commit message
#!/bin/sh
BRANCH_NAME=$(git symbolic-ref --short HEAD)
ISSUE_ID=$(echo $BRANCH_NAME | grep -o '[M|m][F\|f]-[0-9]*')
if [ -n "$ISSUE_ID" ]; then
sed -i.bak -e "1s/$/ [$ISSUE_ID]/" $1
fi
{
"scripts": {
"start": "parcel index.html"
},
"devDependencies": {
"parcel": "^1.11.0"
},
"dependencies": {
"color-harmony": "^0.3.0"
}
var extend = require('./utils').extend;
var Angular1Processor = require('./Angular1Processor');
const TEMPLATE_BEGIN = Buffer('styles:[`');
const TEMPLATE_END = Buffer('`]');
var Angular2LessStylesProcessor = extend(Angular1Processor, {
/**
* @override
*/
# Creates an encrypted and writable dmg file from subfolder. Execute: edmg subfoldername 700
function edmg(){
hdiutil create -encryption AES-256 -size $2m -stdinpass -srcfolder $1 -fs HFS+ -format UDRW -volname $1 $1.dmg
}
@konstantindenerz
konstantindenerz / document-md.svg
Created January 28, 2016 11:23
Document Icon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<script src='https://code.jquery.com/jquery-2.1.4.min.js'></script>
<script>
$(function(){
var $items = $('.items');
var images = [
{
id:1,
width: 960,
height: 720
@konstantindenerz
konstantindenerz / gulpfile.js
Last active September 14, 2015 14:10
Config example for: Gulp + Livereload + Nodemon + DNX (ASP.NET)
'use strict';
var gulp = require("gulp"),
rimraf = require("rimraf"),
concat = require("gulp-concat"),
cssmin = require("gulp-cssmin"),
uglify = require("gulp-uglify"),
project = require("./project.json"),
livereload = require('gulp-livereload'),
nodemon = require('nodemon');
@konstantindenerz
konstantindenerz / gist:eca5ca453e23f8e5772b
Created March 24, 2015 13:54
Pagination, Filtering, Sorting with Total Row Count // SQL Server
DECLARE @PageNumber AS INT, @RowsPerPage AS INT
SET @PageNumber = 1
SET @RowsPerPage = 20
SELECT * FROM (
SELECT ROW_NUMBER() OVER(ORDER BY Id /* Sort example*/) AS [Meta.Index], COUNT(Id) OVER() [Meta.Total],
i.* FROM Items i
WHERE Id > 5 AND Id < 20 -- Filter example
) AS result
WHERE [Meta.Index] BETWEEN ((@PageNumber - 1) * @RowsPerPage + 1) AND (@PageNumber * @RowsPerPage) -- Pagination
ORDER BY [Meta.Index]
@-webkit-keyframes pulse {
from {
width: 170px;
}
59% {
margin-left: 0;
margin-top: 0;
width: 170px;
@konstantindenerz
konstantindenerz / ZoomBorderAnimationDemo.css
Last active August 29, 2015 14:04
CSS3 - Animation - ZoomBorderAnimation
/*The definition of the animation:*/
@-webkit-keyframes zoomBorderAnimation {
from {
border-color: rgba(87,181,212, 0.4);
border-width: 1px;
}
70% {
border-color: rgba(87,181,212, 0.8);