Skip to content

Instantly share code, notes, and snippets.

@wingrunr21
wingrunr21 / chnode.rb
Last active January 8, 2018 22:27
Unofficial chnode Homebrew (brew) formula
class Chnode < Formula
desc "Change between installed Node versions in your current shell."
homepage "https://github.com/steakknife/chnode"
url "https://github.com/steakknife/chnode/archive/v1.2.3.tar.gz"
sha256 "ae0bd1d9227ef76286d19331f9a3c5fcc1926e70f4ef0d3896a8f9f7b463c792"
head "https://github.com/steakknife/chnode.git"
def install
bin.install "chnode", "chnode-auto", "chnode-exec"
doc.install "README.md", "LICENSE", "CHANGELOG.md"
@wingrunr21
wingrunr21 / environment.js
Created October 2, 2017 19:43
Simple webpacker server side rendering
const webpack = require('webpack')
const { environment } = require('@rails/webpacker')
// Don't use commons chunk for server_side_render chunk
const entries = environment.toWebpackConfig().entry
const commonsChunkEligible = Object.keys(entries).filter(name => name !== 'server_side_render')
environment.plugins.set('CommonsChunkVendor', new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks: (module, count) => {
@wingrunr21
wingrunr21 / honeyalarmserver
Created July 17, 2015 14:13
HoneyAlarmServer Raspberry Pi init script
#! /bin/sh
# /etc/init.d/honeyalarmserver
### BEGIN INIT INFO
# Provides: honeyalarmserver
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Honey Alarm Server service
# Description: Honey Alarm Server service
@wingrunr21
wingrunr21 / _border_triangle.css.scss
Created October 6, 2014 21:20
A mixin that helps you create borders with triangles sticking out of the side
// Generates the css for a border with a triangle set along it
//
// $side is the border side (left, right, top, bottom)
// $width is the border's width
// $style is the border's style
// $color is the border/triangle color
// $size is the size of the triangle
// it takes one or two values: width and height
// $offset is how far down the border the triangle should sit
// $direction is how the triangle should face
@wingrunr21
wingrunr21 / currency_helper.rb
Created October 6, 2014 21:19
Provides a method similar to the number_to_currency Rails helper, except that the decimal portion of the resulting formatted text is wrapped in a configurable tag (sup by default)
# This module provides a method similar to the number_to_currency
# Rails helper, except that the decimal portion of the resulting
# formatted text is wrapped in a configurable tag (sup by default)
#
# Copyright (C) 2014 Turn4 LLC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
@wingrunr21
wingrunr21 / phone_link_helper.rb
Created October 6, 2014 21:18
Rails helper that will create tel: style anchor tags in a similar fashion as to how the link_to Rails helper operates
@wingrunr21
wingrunr21 / SassMeister-input.scss
Created October 1, 2014 19:18
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@mixin desc($name) {
@at-root &-#{$name} { @content; }
}
@mixin tdesc($name, $parent) {
@wingrunr21
wingrunr21 / SassMeister-input.scss
Created October 1, 2014 18:58
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
@mixin desc($name) {
@at-root &-#{$name} { @content; }
}
@mixin mod($name) {

Keybase proof

I hereby claim:

  • I am wingrunr21 on github.
  • I am wingrunr21 (https://keybase.io/wingrunr21) on keybase.
  • I have a public key whose fingerprint is 103C 35BC 88C8 3416 663C 71DE 1BE2 5556 F415 9273

To claim this, I am signing this object:

@wingrunr21
wingrunr21 / SassMeister-input.scss
Created January 21, 2014 14:47
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
$turquoise: #000000;
$green-sea: #ffffff;
@mixin calc-color($first-color, $second-color) {
.palette-#{$first-color} {