Skip to content

Instantly share code, notes, and snippets.

@manojkm
manojkm / SassMeister-input.scss
Created November 18, 2018 04:47 — forked from Rplus/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// libsass (v3.3.2)
// ----
@function nth-selector($str, $n) {
@for $i from 1 through $n {
@if (str_index($str, ' ')) {
@if $i == $n {
$str: str_slice($str, 0, str_index($str, ' ') - 1);
} @else {
@manojkm
manojkm / Git push deployment in 7 easy steps.md
Created July 23, 2016 15:53 — forked from thomasfr/Git push deployment in 7 easy steps.md
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@manojkm
manojkm / post-receive
Created July 23, 2016 15:40 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then