Skip to content

Instantly share code, notes, and snippets.

View dlewand691's full-sized avatar

Daniel Lewandowski dlewand691

View GitHub Profile
@dlewand691
dlewand691 / gist:f85a2e0e29ea91877ab893a26680367a
Created February 3, 2022 15:32
SASS Mixin to automatically create CSS utility classes based on a nested map
// Brand
$primary: red;
$secondary: green;
$tertiary: blue;
// Colour variations
$shade-amount: 15%;
$trans-amount: 0.5;
@dlewand691
dlewand691 / modifiers.scss
Created February 3, 2022 14:44 — forked from sarahdayan/modifiers.scss
Sass Modifiers Mixin
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// Sass modifiers mixin by Sarah Dayan
// Generate All Your Utility Classes with Sass Maps: frontstuff.io/generate-all-your-utility-classes-with-sass-maps
// http://frontstuff.io
// https://github.com/sarahdayan
@dlewand691
dlewand691 / fix-homebrew-npm.md
Created July 14, 2016 18:16 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@dlewand691
dlewand691 / twitter_scrape.php
Last active August 29, 2015 14:27
Twitter Analytics Scraper
<?php
// Call this with a cron script on a timed interval to scrape it
$user_agent = $_SERVER['HTTP_USER_AGENT']; // its possible you may wish to use an alternative user agent here
// First call gets hidden form field authenticity_token
// and session cookie
$ch = curl_init();
$sTarget = "https://twitter.com/";
curl_setopt($ch, CURLOPT_URL, $sTarget);