Skip to content

Instantly share code, notes, and snippets.

@ldong
ldong / download_egghead_videos.md
Last active November 17, 2025 13:01
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@roblevintennis
roblevintennis / gist:865de775fb988bfad9a1
Last active May 7, 2017 20:20
Responsive Inline SVGs Sass Mixin
$svg-container-namespace: '.svg-container';
//Give 'em' 1:1 responsive container by default
#{$svg-container-namespace} {
display: inline-block;
position: relative;
height: 0;
width: 100%;
padding: 0;
//Default for 1:1 aspect ratio
@ezekg
ezekg / slider.coffee
Last active August 29, 2015 14:11
Slider
"use-strict"
###
# Slider
#
# @example
# ```haml
# .slider__wrapper
# .slider
# .slider__slide.slider__slide--active
@corysimmons
corysimmons / resize.js
Last active January 3, 2018 16:08
John Resig - Learning from Twitter Tiny JS Throttle
let didResize = false
window.addEventListener(`resize`, () => {
didResize = true
})
setInterval(() => {
if (didResize) {
// Do stuff
didResize = false
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active November 25, 2025 13:25
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@kyledrake
kyledrake / ferengi-plan.txt
Last active November 14, 2025 04:39
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@jescalan
jescalan / stylus-plugins.md
Created January 5, 2014 01:20
Stylus Plugin Use

Stylus Plugin Use

This document will briefly review a few of the more common ways of using stylus plugins for those who are not familiar. Throughout these examples, we will be using a non-existant stylus plugin called example. Please change example out for whatever plugin you are actually trying to use!

Standalone/Node

First example is for if you are building your own stylus pipeline in node. This is a pretty standard way to do things.

@bricker
bricker / a.rb
Created December 16, 2013 19:15
def slides_exists_and_are_hashed_yaml
return if slides.blank?
slides_yml = YAML.load(slides)
if Array(slides_yml).any? { |_, v| v.nil? } || slides_yml.instance_of?(String)
errors.add(:slides, 'not a valid YAML file (did you include at least one key: value?)')
end
end
@jescalan
jescalan / stylis-lib-rails.md
Created November 8, 2013 19:41
Getting stylus libraries into rails
  1. put gem stylus in your Gemfile.
  2. create an empty directory named node_modules
  3. run npm install your-lib
  4. make an initializer and add this text to it: Stylus.use('your-lib') if defined?(Stylus)
  5. make a new stylus file in your app/assets folder
  6. use your library