Skip to content

Instantly share code, notes, and snippets.

View lunelson's full-sized avatar

Lu Nelson lunelson

View GitHub Profile
@jfloff
jfloff / mamp.md
Last active October 31, 2025 18:50
How to get MAMP to work with SSL ... Yes really.

First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:

sudo lsof | grep LISTEN

If you do happen to have any process with something like this *:http (LISTEN), you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)

ps <pid of that process>

If you don't see MAMP, you are in good hands, I have just the thing for you:

@yyx990803
yyx990803 / nl.sh
Last active February 21, 2025 05:40
npm list only top level modules.
alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
#!/usr/bin/env ruby
# Convert SASS/SCSS to Stylus
require 'sass'
class ToStylus < Sass::Tree::Visitors::Base
def visit(node)
method = "visit_#{node_name node}"
if self.respond_to?(method, true)
@ryokun6
ryokun6 / Gruntfile.js
Created October 10, 2013 02:42
Gruntfile template LiveReload with Takana
// Generated on 2013-10-08 using generator-angular 0.4.0
'use strict';
var LIVERELOAD_PORT = 35729;
var lrSnippet = require('connect-livereload')({ port: LIVERELOAD_PORT });
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
@fideloper
fideloper / install.sh
Last active October 30, 2023 20:03
Vagrant Provisioning Script for PHP applications. This installs a LAMP stack.
#!/usr/bin/env bash
echo ">>> Starting Install Script"
# Update
sudo apt-get update
# Install MySQL without prompt
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root'
@bomberstudios
bomberstudios / sketch-plugins.md
Last active January 2, 2026 16:22
A list of Sketch plugins hosted at GitHub, in no particular order.
@lunelson
lunelson / SassMeister-input.scss
Created January 30, 2014 10:50
Another Scratchpad for MQ system
// ----
// libsass (v0.7.0)
// ----
@import "sass-list-maps";
@function get($args...) {
@return map-get-z($args...);
}
@function merge($args...) {
@return map-merge-z($args...);
@lunelson
lunelson / SassMeister-input.scss
Created January 30, 2014 11:20
Optimized `set-nth()` vs old `replace-nth()`
// ----
// libsass (v0.7.0)
// ----
/*
comparison of old and new replace-nth / set-nth
*/
// algorithm copied from early version of sassylists
@function replace-nth($list, $value, $index, $sep: 'comma') {
@lunelson
lunelson / SassMeister-input.scss
Created February 10, 2014 12:25
Ref for libsass issue
// ----
// Sass (v3.3.0.rc.3)
// Compass (v1.0.0.alpha.18)
// ----
@mixin hidpi($num, $denom: 1) {
@media
(-webkit-min-device-pixel-ratio: $num/$denom),
(min--moz-device-pixel-ratio: $num/$denom),
(-o-min-device-pixel-ratio: #{$num}/#{$denom}),
@lunelson
lunelson / SassMeister-input.scss
Last active August 29, 2015 13:56
Additional functions for Sass List Maps
// ----
// Sass (v3.2.14)
// Compass (v0.12.2)
// Sass List-Maps (v0.9.3)
// ----
@import "sass-list-maps";
/*
EXTRA FUNCTIONS FOR SASS LIST MAPS