Skip to content

Instantly share code, notes, and snippets.

@brschwar
brschwar / icons.sass
Last active August 29, 2015 14:15 — forked from nickawalsh/icons.sass
@import compass
$icons: sprite-map("icons/*.png")
$icons-hd: sprite-map("icons-hd/*.png")
i
background: $icons
display: inline-block
@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi)
background: $icons-hd
@brschwar
brschwar / respsizes.js
Created October 16, 2015 16:08 — forked from tevko/respsizes.js
Dev Tools Snippet to auto-calculate responsive image sizes value on window resize
/**
*
* Paste image class / identifier in IIFE parenthesis at end of function
*
* */
(function(i){"use strict";var img=document.querySelector(i),sizes=[];window.addEventListener("resize",()=>{var vw=Math.round(((img.offsetWidth*100)/window.innerWidth))+"vw",mq="(min-width: "+window.innerWidth+"px)",value=vw;vw!=="0vw"&&sizes.indexOf(vw)===-1&&(sizes.push(value),console.log(mq,vw))})})("PASTE CLASS OR IDENTIFIER HERE");
@brschwar
brschwar / .gitconfig
Created December 9, 2015 03:25 — forked from robmiller/.gitconfig
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@brschwar
brschwar / tmux-cheatsheet.markdown
Created February 23, 2017 16:04 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@brschwar
brschwar / add_apache_brew.md
Created May 9, 2017 21:48 — forked from vitorbritto/add_apache_brew.md
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"

and install Apache 2.2 with the event MPM, and we'll use Homebrew's OpenSSL library

@brschwar
brschwar / gist:99637ae84d2e14d42e9ca99452c245e3
Created December 6, 2017 16:31 — forked from wayspurrchen/gist:b6fd4eb085edf54406b7
Web Performance Optimization Techniques
@brschwar
brschwar / README.md
Created April 12, 2018 21:16 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@brschwar
brschwar / curl.md
Created July 10, 2018 19:47 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@brschwar
brschwar / README.md
Created December 12, 2018 14:47 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
@brschwar
brschwar / Merging PR for 2 branches
Created March 13, 2019 20:51 — forked from alopresto/Merging PR for 2 branches
Instructions to merge pull requests for multiple branches (master, support, etc.)
#Steps to merge/close pull requests with two main branches
As NiFi now has a 1.0 (master) and 0.x (support) branch, pull requests (PR) must be applied to both. Here is a step-by-step guide for committers to ensure this occurs for all PRs.
1. Check out the latest master
``` $ git checkout master
$ git pull upstream master
```
2. Check out the PR (example #327). This will be in `detached-HEAD` state. (Note: You may need to edit the `.git/config` file to add the `fetch` lines [below](#fetch))