Skip to content

Instantly share code, notes, and snippets.

View webcultist's full-sized avatar

Eugen Kraft webcultist

View GitHub Profile
@webcultist
webcultist / quantity-query.scss
Last active September 15, 2015 14:53 — forked from satya164/quantity-query.scss
Quantity Queries in Sass
@mixin quantity-query($selector, $type, $amount, $max: null) {
@if $type == at-least {
#{$selector}:nth-last-child(n+#{$amount}),
#{$selector}:nth-last-child(n+#{$amount}) ~ #{$selector} { @content; }
} @else if $type == at-most {
#{$selector}:nth-last-child(-n+#{$amount}):first-child,
#{$selector}:nth-last-child(-n+#{$amount}):first-child ~ #{$selector} { @content; }
} @else if $type == between {
@if type-of($max) != "number" {
@error "Max value must be a number for quantity-query.";
@webcultist
webcultist / environment-install.md
Created October 17, 2015 01:03 — forked from alefi87/environment-install.md
OS X 10.10 Yosemite, Apache, PHP 5.6, MySQL, Memcache, SSL setup with Homebrew
@webcultist
webcultist / gist:7eedfc7875b9f6e77e64c51540d91311
Last active April 25, 2018 09:48 — forked from gthln/gist:8401080
Install Composer on Managed Hosting at Domainfactory

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH

Step 2:

Add a hidden binary folder in root and add a symlink to a more up-to-date php version

@webcultist
webcultist / xdebug
Created February 25, 2020 02:06 — forked from rhukster/xdebug
#!/usr/bin/env bash
# http://github.com/w00fz/xdebug-osx
#
# @author Djamil Legato http://github.com/w00fz/xdebug-osx
# @modified Andy Miller - Homebrew/core compatibility
# @license MIT
# @version 1.2
app="$(basename "$0")"
command="$1"
@webcultist
webcultist / ping-test.sh
Created April 5, 2020 17:43 — forked from PHLAK/ping-test.sh
24 hour while loop in bash
#!/bin/bash
## Script start time
START=$(date +%s)
## Total run time
DURRATION=$((60 * 60 * 24))
## Total running time
UPTIME=$(($(date +%s) - $START))